本文整理汇总了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 });
}
}
示例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 });
}
}
示例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 });
}
}
示例4: Delete
public void Delete(int id)
{
using (SqlHelper sqlh = new SqlHelper())
{
sqlh.ExecNoQuery(@"
delete from Access.user
where [user] = @Id");
}
}
示例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 });
}
}
示例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 });
}
}
示例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 });
}
}
示例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 });
}
}
示例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 });
}
}
示例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 });
}
}
示例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 });
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}