public void DeleteCategory(int CategoryID) { Categories categories = db.categories.Where(temp => temp.CategoryID == CategoryID).FirstOrDefault(); db.categories.Remove(categories); db.SaveChanges(); }
public void DeleteProjects(int ProjectID) { Projects project = db.projects.Where(temp => temp.ProjectID == ProjectID).FirstOrDefault(); db.projects.Remove(project); db.SaveChanges(); }
public void DeleteTask(int TaskID) { Tasks tasks = db.tasks.Where(temp => temp.TaskID == TaskID).FirstOrDefault(); db.tasks.Remove(tasks); db.SaveChanges(); }
public void DeleteTaskDone(int TaskDoneID) { TasksDone ExistingTaskDone = db.tasksDones.Where(temp => temp.TaskDoneID == TaskDoneID).FirstOrDefault(); if (ExistingTaskDone != null) { db.tasksDones.Remove(ExistingTaskDone); db.SaveChanges(); } }
public void DeleteFinalComment(int FinalCommentID) { FinalComments ExistingFinalComment = db.finalComments.Where(temp => temp.FinalCommentID == FinalCommentID).FirstOrDefault(); if (ExistingFinalComment != null) { db.finalComments.Remove(ExistingFinalComment); db.SaveChanges(); } }
public void DeleteUser(int UserID) { Users user = db.users.Where(temp => temp.UserID == UserID).FirstOrDefault(); if (user != null) { db.users.Remove(user); db.SaveChanges(); } }