/// <summary> /// This function deletes the dataobject after finding it into the database /// </summary> /// <param name="dataObject"></param> /// <returns></returns> public CustomResponse Delete(T dataObject) { T existing = dbSet.Find(dataObject); dbSet.Remove(existing); return(new CustomResponse() { Status = 200, Data = _context.SaveChanges(), Result = "Data deleted successfully" }); }
public void Save() { _context.SaveChanges(); }