source: FarmatikoServices/Services/AdminService.cs@ 1454207

Last change on this file since 1454207 was 1454207, checked in by DimitarSlezenkovski <dslezenkovski@…>, 2 years ago

Change structure, Add repo, services & controllers

  • Property mode set to 100644
File size: 1.0 KB
Line 
1using FarmatikoData.FarmatikoRepoInterfaces;
2using FarmatikoData.Models;
3using FarmatikoServices.FarmatikoServiceInterfaces;
4using System;
5using System.Collections.Generic;
6using System.Linq;
7using System.Text;
8using System.Threading.Tasks;
9
10namespace FarmatikoServices.Services
11{
12 public class AdminService : IAdminService
13 {
14 private readonly IAdminRepo _adminRepo;
15 public AdminService(IAdminRepo adminRepo)
16 {
17 _adminRepo = adminRepo;
18 }
19
20 public async Task<IQueryable<RequestPharmacyHead>> GetCalimingRequests()
21 {
22 var req = await Task.Run(() => _adminRepo.GetClaimingRequests());
23 return req;
24 }
25
26 public async Task<IQueryable<PharmacyHead>> GetPharmacyHeads()
27 {
28 var PHeads = await Task.Run(() => _adminRepo.GetPharmacyHeads());
29 return PHeads;
30 }
31
32 public async Task RejectRequest(RequestPharmacyHead req)
33 {
34 await _adminRepo.RemoveClaimRequest(req);
35 }
36 }
37}
Note: See TracBrowser for help on using the repository browser.