Пример #1
0
 private void InitializeCathegory(CathegoryModel model, Cathegory cathegory)
 {
     cathegory.CathegoryId = Guid.NewGuid();
     cathegory.Name = model.Name;
 }
Пример #2
0
 public void AddCathegory(DataContext db,CathegoryModel model)
 {
     Cathegory newCathegory = db.Cathegories.Create();
     InitializeCathegory(model,newCathegory);
     db.SaveChanges();
 }