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)); }
public void CreateUser(UserEntity user) { DBOneRepositories.UserRepository.Create(user.ToDalUser()); DBOneRepositories.Commit(); }