public void EditInventoryCategory(InventoryCategory inventoryCategory) { var original = inventoryCategoryRepository.GetById(s => s.CategoryId == inventoryCategory.CategoryId); inventoryCategoryRepository.Update(original, inventoryCategory.AutoMapObject <InventoryCategory, InventoriesCategory>()); }
public int CreateInventoryCategory(InventoryCategory inventoryCategory) { var res = inventoryCategoryRepository.Insert(inventoryCategory.AutoMapObject <InventoryCategory, DB.InventoriesCategory>()); return(res.CategoryId); }