public CategoryDto Create(CategoryDto categoryDto) { if (!IsAuthorized()) { throw new HttpResponseException(HttpStatusCode.Unauthorized); } var category = categoryDto.CreateModel(); this._unitOfWork.Categories.Add(category); this._unitOfWork.Complete(); return(new CategoryDto(category)); }