Example #1
0
        public JsonResult DeleteUser(Guid id)
        {
            ResponseModel response = new ResponseModel(true);
            owner_user    dbItem   = RepoOwner.FindByPkUser(id);

            RepoOwner.DeleteUser(dbItem);

            return(Json(response));
        }
Example #2
0
        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));
        }