当前位置: 首页>>代码示例>>C#>>正文


C# SqlHelper.ExecNoQuery方法代码示例

本文整理汇总了C#中SqlHelper.ExecNoQuery方法的典型用法代码示例。如果您正苦于以下问题:C# SqlHelper.ExecNoQuery方法的具体用法?C# SqlHelper.ExecNoQuery怎么用?C# SqlHelper.ExecNoQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SqlHelper的用法示例。


在下文中一共展示了SqlHelper.ExecNoQuery方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Delete

 /// <summary>
 /// Удаляет семестр.
 /// </summary>
 /// <param name="id">Идентификатор.</param>
 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from Calendar.semester
     where semester = @id", new { id });
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:13,代码来源:SemesterRepository.cs

示例2: Delete

 /// <summary>
 /// Удаляет учебный курс.
 /// </summary>
 /// <param name="id">Идентификатор.</param>
 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from Specialty.specialty_detail
     where specialty_detail = @id", new { id });
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:13,代码来源:SpecialtyDetailRepository.cs

示例3: Delete

 /// <summary>
 /// Удаляет факультет.
 /// </summary>
 /// <param name="id">Идентификатор.</param>
 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from Faculty.faculty
     where faculty = @id", new { id });
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:13,代码来源:FacultyRepository.cs

示例4: Delete

 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from Access.user
     where [user] = @Id");
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:9,代码来源:UserRepository.cs

示例5: Delete

 /// <summary>
 /// Удаляет контакт.
 /// </summary>
 /// <param name="id">Идентификатор.</param>
 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from Contact.contact
     where contact = @id", new { id });
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:13,代码来源:ContactRepository.cs

示例6: Delete

 /// <summary>
 /// Удаляет корпус.
 /// </summary>
 /// <param name="id">Корпус.</param>
 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from Auditory.housing
     where housing = @id", new { id });
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:13,代码来源:HousingRepository.cs

示例7: Delete

 /// <summary>
 /// Удаляет человека.
 /// </summary>
 /// <param name="id">Идентификатор.</param>
 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from Person.person
     where person = @id", new { id });
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:13,代码来源:PersonRepository.cs

示例8: Delete

 /// <summary>
 /// Удаляет кафедру.
 /// </summary>
 /// <param name="id">Идентификатор.</param>
 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from Cathedra.cathedra
     where cathedra = @id", new { id });
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:13,代码来源:CathedraRepository.cs

示例9: Delete

 /// <summary>
 /// Удаляет дисциплину.
 /// </summary>
 /// <param name="id">Идентификатор.</param>
 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from Discipline.discipline
     where discipline = @id", new { id });
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:13,代码来源:DisciplineRepository.cs

示例10: Delete

 /// <summary>
 /// Удаляет учебный план.
 /// </summary>
 /// <param name="id">Идентификатор.</param>
 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from TrainingPlan.specialty_plan
     where specialty_plan = @id", new { id });
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:13,代码来源:PlanRepository.cs

示例11: Delete

 /// <summary>
 /// Удаляет задачу.
 /// </summary>
 /// <param name="id">Идентификатор.</param>
 public void Delete(int id)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     delete from Task.task
     where task = @id", new { id });
     }
 }
开发者ID:BaTpyLLI,项目名称:IS,代码行数:13,代码来源:TaskRepository.cs

示例12: Update

 public void Update(UserItem user)
 {
     using (var sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     update Access.[user]
     set
     login = @Login,
     password = @Password
     where [user] = @Id", user);
     }
 }
开发者ID:BaTpyLLI,项目名称:IS,代码行数:12,代码来源:UserRepository.cs

示例13: Delete

 /// <summary>
 /// Исключение студента из группы.
 /// </summary>
 /// <param name="student">Студенты.</param>
 public void Delete(StudentItem student)
 {
     using (var sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     insert into Person.student
     (
     event_date,
     person,
     team,
     act
     )
     values
     (
     getdate(),
     @Id,
     @TeamId,
     -1
     )", student);
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:25,代码来源:StudentRepository.cs

示例14: Delete

 /// <summary>
 /// Удаляет преподавателя.
 /// </summary>
 /// <param name="id">Идентификатор.</param>
 public void Delete(LecturerItem lecturer)
 {
     using (SqlHelper sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     insert into Person.lecturer
     (
     event_date,
     act,
     person,
     cathedra
     )
     values
     (
     getdate(),
     -1,
     @Id,
     @CathedraId
     )
     select @Id", lecturer);
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:26,代码来源:LecturerRepository.cs

示例15: Update

 /// <summary>
 /// Обновляет данные по учебному плану.
 /// </summary>
 /// <param name="plan">Учебный план.</param>
 public void Update(PlanItem plan)
 {
     using (var sqlh = new SqlHelper())
     {
         sqlh.ExecNoQuery(@"
     update TrainingPlan.specialty_plan
     set
     name = @Name,
     specialty_detail = @SpecialtyDetail,
     semester = @Semester,
     lesson_type = @LessonType,
     discipline = @Discipline,
     auditory = @Auditory
     where specialty_plan = @Id", plan);
     }
 }
开发者ID:dha01,项目名称:IS,代码行数:20,代码来源:PlanRepository.cs


注:本文中的SqlHelper.ExecNoQuery方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。