Last change
on this file since de18858 was e42f61a, checked in by DimitarSlezenkovski <dslezenkovski@…>, 4 years ago |
Add more services
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | using FarmatikoData.FarmatikoRepoInterfaces;
|
---|
2 | using FarmatikoData.Models;
|
---|
3 | using FarmatikoServices.FarmatikoServiceInterfaces;
|
---|
4 | using System.Collections.Generic;
|
---|
5 |
|
---|
6 | namespace FarmatikoServices.Services
|
---|
7 | {
|
---|
8 | public class MedicineService : IMedicineService
|
---|
9 | {
|
---|
10 | private IMedicineRepository _medicineRepository;
|
---|
11 | public MedicineService(IMedicineRepository medicineRepository)
|
---|
12 | {
|
---|
13 | _medicineRepository = medicineRepository;
|
---|
14 | }
|
---|
15 |
|
---|
16 | public void Add(Medicine medicine)
|
---|
17 | {
|
---|
18 | _medicineRepository.Add(medicine);
|
---|
19 | }
|
---|
20 |
|
---|
21 | public IEnumerable<Medicine> GetAll()
|
---|
22 | {
|
---|
23 | return _medicineRepository.GetAll();
|
---|
24 | }
|
---|
25 |
|
---|
26 | public IEnumerable<Medicine> GetByManufacturer(string Manufacturer)
|
---|
27 | {
|
---|
28 | return _medicineRepository.GetByManufacturer(Manufacturer);
|
---|
29 | }
|
---|
30 |
|
---|
31 | public IEnumerable<Medicine> GetByName(string Name)
|
---|
32 | {
|
---|
33 | return _medicineRepository.GetByName(Name);
|
---|
34 | }
|
---|
35 |
|
---|
36 | public void Remove(string Medicine)
|
---|
37 | {
|
---|
38 | _medicineRepository.Remove(Medicine);
|
---|
39 | }
|
---|
40 | }
|
---|
41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.