示例#1
0
        // GET api/user
        public IEnumerable<User> GetAll()
        {
            var ruler = new UserRuler();

            var result = ruler.GetAll();

            return result;
        }
示例#2
0
        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;
        }