public JsonResult DeleteUser(Guid id) { ResponseModel response = new ResponseModel(true); owner_user dbItem = RepoOwner.FindByPkUser(id); RepoOwner.DeleteUser(dbItem); return(Json(response)); }
public HttpResponseMessage Delete(int id) { User user = repository.Users.FirstOrDefault(u => u.Id == id); if (user == null) { return(Request.CreateResponse(HttpStatusCode.NoContent)); } repository.DeleteUser(user); return(Request.CreateResponse(HttpStatusCode.OK, user)); }