Changeset a55ef91 for FarmatikoServices/Services/HealthcareWorkerService.cs
- Timestamp:
- 07/31/20 10:15:02 (4 years ago)
- Branches:
- master
- Children:
- d8fafb8
- Parents:
- 4e72684
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
FarmatikoServices/Services/HealthcareWorkerService.cs
r4e72684 ra55ef91 1 using FarmatikoData.FarmatikoRepo; 2 using FarmatikoData.FarmatikoRepoInterfaces; 1 using FarmatikoData.FarmatikoRepoInterfaces; 3 2 using FarmatikoData.Models; 4 3 using FarmatikoServices.FarmatikoServiceInterfaces; 5 4 using System; 6 using System.Collections.Generic; 7 using System.Text; 5 using System.Linq; 8 6 9 7 namespace FarmatikoServices.Services … … 18 16 public void Add(HealthcareWorkers healthcareWorker) 19 17 { 20 _healthcareWorkerRepo.Add(healthcareWorker); 18 try 19 { 20 if (healthcareWorker != null) 21 _healthcareWorkerRepo.Add(healthcareWorker); 22 } 23 catch (Exception e) 24 { 25 e = new Exception("Can't Add healthcare worker is null"); 26 throw e; 27 } 21 28 } 22 29 23 public I Enumerable<HealthcareWorkers> GetAll()30 public IQueryable<HealthcareWorkers> GetAll() 24 31 { 25 32 return _healthcareWorkerRepo.GetAll(); 26 33 } 34 35 public void Remove(HealthcareWorkers healthcareWorker) 36 { 37 try 38 { 39 if (healthcareWorker != null) 40 _healthcareWorkerRepo.Remove(healthcareWorker); 41 } 42 catch (Exception e) 43 { 44 e = new Exception("Can't Remove healthcare worker is null"); 45 throw e; 46 } 47 } 27 48 } 28 49 }
Note:
See TracChangeset
for help on using the changeset viewer.