Changeset a55ef91 for FarmatikoServices/Services/HealthFacilityService.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/HealthFacilityService.cs
r4e72684 ra55ef91 2 2 using FarmatikoData.FarmatikoRepoInterfaces; 3 3 using FarmatikoData.Models; 4 using System .Collections.Generic;4 using System; 5 5 using System.Linq; 6 6 … … 18 18 public void Add(HealthFacilities healthFacility) 19 19 { 20 _healthFacilityRepository.Add(healthFacility); 20 try 21 { 22 if (healthFacility != null) 23 _healthFacilityRepository.Add(healthFacility); 24 } 25 catch (Exception e) 26 { 27 e = new Exception("Can't Add health facility is null"); 28 throw e; 29 } 21 30 } 22 31 23 public I Enumerable<HealthFacilities> GetAll()32 public IQueryable<HealthFacilities> GetAll() 24 33 { 25 34 return _healthFacilityRepository.GetAll(); 26 35 } 36 37 public void Remove(HealthFacilities healthFacility) 38 { 39 try 40 { 41 if (healthFacility != null) 42 _healthFacilityRepository.Remove(healthFacility); 43 } 44 catch(Exception e) 45 { 46 e = new Exception("Can't Remove health facility is null"); 47 throw e; 48 } 49 } 27 50 } 28 51 }
Note:
See TracChangeset
for help on using the changeset viewer.