Exemplo n.º 1
0
 public static TbserviceDto FromModel(Tbservice model)
 {
     return(new TbserviceDto()
     {
         IdServ = model.IdServ,
         LibServ = model.LibServ,
         IdUser = model.IdUser,
         DateCreation = model.DateCreation,
         ModifieLe = model.ModifieLe,
         ModifiePar = model.ModifiePar,
         StateCode = model.StateCode,
         StatusCode = model.StatusCode,
         Tbspecialite = model.Tbspecialite,
     });
 }
Exemplo n.º 2
0
 public void SaveDichVu(Tbservice model)
 {
     if (model.ServiceId == 0)
     {
         context.Tbservice.Add(model);
     }
     else
     {
         //Tbservice service = context.Tbservice
         //    .FirstOrDefault(p => p.ServiceId == model.ServiceId);
         //if (service != null)
         //{
         //    service.CategoryName = model.CategoryName;
         //    service.GroupcateId = model.GroupcateId;
         //    service.CategoryIcon = model.CategoryIcon;
         //    service.CategoryDepcription = model.CategoryDepcription;
         //}
     }
     context.SaveChanges();
 }