public IHttpActionResult CreateCategory(LogCategoryDTO logCategoryDTO) { if (!ModelState.IsValid) { throw new HttpResponseException(System.Net.HttpStatusCode.BadRequest); } var category = Mapper.Map <LogCategoryDTO, LogCategory>(logCategoryDTO); category.ApplicationUserId = User.Identity.GetUserId(); //category = context.LogCategories.Add(category); unitOfWork.LogCategories.Insert(category); unitOfWork.Commit(); return(Ok(Mapper.Map <LogCategory, LogCategoryDTO>(category))); }
public IHttpActionResult UpdateCategory(LogCategoryDTO logCategoryDTO) { return(NotFound()); }