public bool delete()
{
int
res = 0;
var
query = dbcontext.taskdetails.Where(s => s.tid == 1).SingleOrDefault();
dbcontext.taskdetails.Remove(query);
res = dbcontext.SaveChanges();
if (res > 0)
{
return true;
}
else
{
return false;
}
}
No comments:
Post a Comment