Ignore:
Timestamp:
07/29/20 20:02:58 (2 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
a55ef91
Parents:
de18858
Message:

Add services

Location:
FarmatikoServices/Services
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • FarmatikoServices/Services/MedicineListService.cs

    rde18858 r4e72684  
    22using FarmatikoData.Models;
    33using FarmatikoServices.FarmatikoServiceInterfaces;
    4 using System;
    54using System.Collections.Generic;
    6 using System.Text;
    75
    86namespace FarmatikoServices.Services
     
    1614        }
    1715
    18         public ICollection<MedicineList> GetAll()
     16        public IEnumerable<MedicineList> GetAll()
    1917        {
    2018            return _medicineListRepository.GetAll();
     
    2826        public ICollection<MedicineList> GetByName(string Name)
    2927        {
    30             return _medicineListRepository.GetByName(Name);
     28            if(Name != null)
     29            {
     30                return _medicineListRepository.GetByName(Name);
     31            }
     32            return null;
    3133        }
    3234
    33         public void SetHasMedicine(MedicineList medicineList, bool HasMedicine)
     35        public bool SetHasMedicine(MedicineList medicineList, bool HasMedicine)
    3436        {
    35             throw new NotImplementedException();
     37            if (medicineList != null)
     38            {
     39                _medicineListRepository.SetHasMedicine(medicineList, HasMedicine);
     40                return true;
     41            }
     42            else return false;
    3643        }
    3744    }
Note: See TracChangeset for help on using the changeset viewer.