Exemplo n.º 1
0
 public ServiceCreateDto Create(ServiceCreateDto service)
 {
     if (service != null)
     {
         var serv = new Clinic.System.Entities.Models.Service();
         serv.Name  = service.Name;
         serv.Price = service.Price;
         _serviceRepository.Create(serv);
         _unitOfWork.Complete();
     }
     return(service);
 }
Exemplo n.º 2
0
 public bool Edit(ServiceEditDto service)
 {
     if (service != null)
     {
         var serv = new Clinic.System.Entities.Models.Service();
         serv.Id    = service.Id;
         serv.Name  = service.Name;
         serv.Price = service.Price;
         _serviceRepository.Edit(serv);
         _unitOfWork.Complete();
         return(true);
     }
     return(false);
 }