public HttpResponseMessage CreateCategory(Category category) { var item = _category.GetFirstOrDefault(z => z.PublicKey == category.PublicKey); if (item != null) return ErrorResult("key"); category.Id = Guid.NewGuid(); _category.CreateItem(category); return SuccessResult(); }
partial void DeleteCategory(Category instance);
partial void UpdateCategory(Category instance);
partial void InsertCategory(Category instance);
public HttpResponseMessage UpdateCategory(Category category) { _category.UpdateCategory(category); return SuccessResult(); }