Пример #1
0
        public HttpResponseMessage Insert(Category entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException("entity");
            }
            dBOneRepositories.CategoryRepository.Insert(entity);
            var result = dBOneRepositories.Commit();

            return(result == 1 ? Request.CreateResponse(HttpStatusCode.Created) : Request.CreateResponse(HttpStatusCode.BadRequest));
        }
Пример #2
0
 public void CreateUser(UserEntity user)
 {
     DBOneRepositories.UserRepository.Create(user.ToDalUser());
     DBOneRepositories.Commit();
 }