// GET api/user public IEnumerable<User> GetAll() { var ruler = new UserRuler(); var result = ruler.GetAll(); return result; }
public ServiceResult<User> InsertUser(User user) { ServiceResult<User> result = new ServiceResult<User>(); try { var userBusiness = new UserRuler(); userBusiness.Insert(user); result.Completed = true; } catch (Exception ex) { result.Completed = false; result.Exception = ex; } return result; }