本文整理汇总了C#中LoveBank.Core.MSData.LoveBankDBContext.Delete方法的典型用法代码示例。如果您正苦于以下问题:C# LoveBankDBContext.Delete方法的具体用法?C# LoveBankDBContext.Delete怎么用?C# LoveBankDBContext.Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LoveBank.Core.MSData.LoveBankDBContext
的用法示例。
在下文中一共展示了LoveBankDBContext.Delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Delete
public ActionResult Delete(int id)
{
using (LoveBankDBContext db = new LoveBankDBContext())
{
AdminUser user = db.T_AdminUser.Find(id);
db.Delete<AdminUser>(user);
db.SaveChanges();
return Success("操作成功");
}
}
示例2: Delete
public ActionResult Delete(int id)
{
using (LoveBankDBContext db = new LoveBankDBContext())
{
Notice notice = db.T_Notice.Find(id);
db.Delete<Notice>(notice);
db.SaveChanges();
db.Dispose();
return Success("操作成功");
}
}
示例3: Delete
public ActionResult Delete(int id)
{
using (LoveBankDBContext db = new LoveBankDBContext())
{
AppVer img = db.T_AppVer.Find(id);
db.Delete<AppVer>(img);
db.SaveChanges();
db.Dispose();
return Success("操作成功");
}
}
示例4: DeleteEditTeamProjectSummary
public ActionResult DeleteEditTeamProjectSummary(int Id)
{
using (LoveBankDBContext db = new LoveBankDBContext())
{
var t_ps = db.T_TeamProjectSummary;
TeamProjectSummary model = t_ps.Find(Id);
db.Delete<TeamProjectSummary>(model);
db.SaveChanges();
return Success("删除成功");
}
}