Пример #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="dbSeedService">IDbSeedService implementation that seeds into database</param>
 /// <param name="database">IDatabase implementation, for operations with database</param>
 /// <param name="prodService">IProductService implementation, for seeding DB with real product data.</param>
 /// <param name="logger">NLog logger</param>
 public DbService(IDiagnosticRepository diagRepo, IDatabase database, IProductService prodService, ILogger logger)
 {
     _diagRepo    = diagRepo;
     _database    = database;
     _prodService = prodService;
     _logger      = logger;
 }
Пример #2
0
        public Diagnostic Post(DiagnosticDTO value)
        {
            Diagnostic model = new Diagnostic()
            {
                PacientId = value.PacientId,
                DoctorId  = value.DoctorId
            };

            return(IDiagnosticRepository.Create(model));
        }
Пример #3
0
        public Diagnostic Put(int id, DiagnosticDTO value)
        {
            Diagnostic model = IDiagnosticRepository.Get(id);

            if (value.PacientId != 0)
            {
                model.PacientId = value.PacientId;
            }

            if (value.DoctorId != 0)
            {
                model.DoctorId = value.DoctorId;
            }

            return(IDiagnosticRepository.Update(model));
        }
 public SimpleCalculatorService(IDiagnosticRepository diagnosticRepository)
 {
     _diagnosticRepository = diagnosticRepository;
 }
Пример #5
0
        public Diagnostic Delete(int id)
        {
            Diagnostic model = IDiagnosticRepository.Get(id);

            return(IDiagnosticRepository.Delete(model));
        }
Пример #6
0
 public ActionResult <Diagnostic> Get(int id)
 {
     return(IDiagnosticRepository.Get(id));
 }
Пример #7
0
 public ActionResult <IEnumerable <Diagnostic> > Get()
 {
     return(IDiagnosticRepository.GetAll());
 }
Пример #8
0
 public DiagnosticController(IDiagnosticRepository diagnosticRepository, IPacientRepository pacientRepository, IDoctorRepository doctorRepository)
 {
     IDiagnosticRepository = diagnosticRepository;
     IPacientRepository    = pacientRepository;
     IDoctorRepository     = doctorRepository;
 }
Пример #9
0
 public diagnosticController(IDiagnosticRepository _diagnosticRepository)
 {
     diagnosticService = new DiagnosticService(_diagnosticRepository);
 }
Пример #10
0
 public DiagnosticsService(IDiagnosticRepository _diagnosticRepository)
 {
     this._diagnosticRepository = _diagnosticRepository;
 }