// POST /api/category public HttpResponseMessage Insert(Department entity) { if (entity == null) { throw new ArgumentNullException("entity"); } dBTwoRepositories.DepartmentRepository.Insert(entity); var result = dBTwoRepositories.Commit(); return(result == 1 ? Request.CreateResponse(HttpStatusCode.Created) : Request.CreateResponse(HttpStatusCode.BadRequest)); }
public void CreateImage(ImageEntity imageEntity) { DBTwoRepositories.ImageRepository.Create(imageEntity.ToDalImage()); DBTwoRepositories.Commit(); }
public void CreateLike(LikeEntity like) { DBTwoRepositories.LikeRepository.Create(like.ToDalLike()); DBTwoRepositories.Commit(); }