public async Task InsertCategoryAsync(Category Category) { Category.PartitionKey = GetCategoryPartitionKey(Category); Category.RowKey = GetCategoryRowKey(Category); Category.PublicId = Category.GetPublicId(); await InsertAsync <Category>(Category, Categories); }
public void InsertCategory(Category Category) { Category.PartitionKey = GetCategoryPartitionKey(Category); Category.RowKey = GetCategoryRowKey(Category); Category.PublicId = Category.GetPublicId(); Insert <Category>(Category, Categories); }
public string Post(Category entity) { if (ModelState.IsValid) { db.InsertCategory(entity); entity.PublicId = entity.GetPublicId(); return entity.GetPublicEntity<Category>().PublicId; } return string.Empty; }