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();
        }
Beispiel #2
0
 partial void DeleteCategory(Category instance);
Beispiel #3
0
 partial void UpdateCategory(Category instance);
Beispiel #4
0
 partial void InsertCategory(Category instance);
 public HttpResponseMessage UpdateCategory(Category category)
 {
     _category.UpdateCategory(category);
     return SuccessResult();
 }