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

Update & add service

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Farmatiko/Controllers/PharmacyController.cs

    r4e72684 ra55ef91  
    1 using System;
    2 using System.Collections.Generic;
     1using System.Collections.Generic;
    32using System.Linq;
    4 using System.Threading.Tasks;
    53using FarmatikoData.Models;
    64using FarmatikoServices.FarmatikoServiceInterfaces;
     
    1917        }
    2018        [HttpGet]
    21         public IEnumerable<Pharmacy> Get()
     19        public IQueryable<Pharmacy> Get()
    2220        {
    2321            return _pharmacyService.GetAll();
    2422        }
     23        [HttpGet]
     24        public ICollection<Pharmacy> GetPharmacies()
     25        {
     26            return _pharmacyService.GetPharmacies();
     27        }
     28        [HttpPost]
     29        public void UpdatePharmacy(Pharmacy pharmacy, string Name)
     30        {
     31            _pharmacyService.UpdatePharmacy(pharmacy,Name);
     32        }
     33        [HttpPost]
     34        public void AddPharmacy(Pharmacy pharmacy)
     35        {
     36            _pharmacyService.Add(pharmacy);
     37        }
     38        [HttpPost]
     39        public void RemovePharmacy(Pharmacy pharmacy)
     40        {
     41            _pharmacyService.Remove(pharmacy);
     42        }
    2543    }
    2644}
Note: See TracChangeset for help on using the changeset viewer.