Ignore:
Timestamp:
07/31/20 10:15:02 (3 years ago)
Author:
DimitarSlezenkovski <dslezenkovski@…>
Branches:
master
Children:
d8fafb8
Parents:
4e72684
Message:

Update & add service

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/Controllers/MedicineListController.cs

    r4e72684 ra55ef91  
    11using System.Collections.Generic;
     2using System.Linq;
    23using FarmatikoData.Models;
    34using FarmatikoServices.FarmatikoServiceInterfaces;
     
    1617        }
    1718        [HttpGet]
    18         public IEnumerable<MedicineList> Get()
     19        public IQueryable<MedicineList> Get()
    1920        {
    2021            return _medicineListService.GetAll();
    2122        }
     23        [HttpGet]
     24        public ICollection<MedicineList> GetByName(string Name)
     25        {
     26            return _medicineListService.GetByName(Name);
     27        }
     28        [HttpGet]
     29        public ICollection<MedicineList> GetByManufacturer(string Manufacturer)
     30        {
     31            return _medicineListService.GetByManufacturer(Manufacturer);
     32        }
     33        /*[HttpPost]
     34        public void SetHasMedicine(MedicineList medicineList, bool HasMedicine)
     35        {
     36            _medicineListService.SetHasMedicine(medicineList, HasMedicine);
     37        }*/
     38        [HttpPost]
     39        public void Add(MedicineList medicineList)
     40        {
     41            _medicineListService.Add(medicineList);
     42        }
     43        [HttpPost]
     44        public void Remove(MedicineList medicineList)
     45        {
     46            _medicineListService.Remove(medicineList);
     47        }
    2248    }
    2349}
Note: See TracChangeset for help on using the changeset viewer.