Ejemplo n.º 1
0
 private void InitializeCathegory(CathegoryModel model, Cathegory cathegory)
 {
     cathegory.CathegoryId = Guid.NewGuid();
     cathegory.Name = model.Name;
 }
Ejemplo n.º 2
0
 public void AddCathegory(DataContext db,CathegoryModel model)
 {
     Cathegory newCathegory = db.Cathegories.Create();
     InitializeCathegory(model,newCathegory);
     db.SaveChanges();
 }