Initial
This commit is contained in:
		
							
								
								
									
										51
									
								
								BusinessLogic/LookupLogic/FwLookupLogic.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								BusinessLogic/LookupLogic/FwLookupLogic.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Threading.Tasks; | ||||
| using Microsoft.Extensions.Configuration; | ||||
| using Microsoft.Extensions.Logging; | ||||
| using BusinessLogic.LookupLogic.Interfaces; | ||||
| using Datamodels.Lookups; | ||||
| using Datamodels.BusinessModels; | ||||
| using Repositories.Interfaces; | ||||
|  | ||||
| namespace BusinessLogic.LookupLogic | ||||
| { | ||||
|     public class FwLookupLogic: ILookupLogic | ||||
|     { | ||||
|  | ||||
|         private readonly IConfiguration _configuration; | ||||
|         private readonly ILogger<FwLookupLogic> _logger; | ||||
|         private readonly IFwMariaLookupRepo _lookupRepo; | ||||
|  | ||||
|         public FwLookupLogic(ILogger<FwLookupLogic> logger, IConfiguration configuration, IFwMariaLookupRepo lookupRepo) | ||||
|         { | ||||
|             _logger = logger; | ||||
|             _configuration = configuration; | ||||
|             _lookupRepo = lookupRepo; | ||||
|         } | ||||
|  | ||||
|         public async Task<DataResult<List<LookupCategory>>> GetAllLookups() | ||||
|         { | ||||
|             var result = await _lookupRepo.GetAllLookups(); | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|         public async Task<DataResult<LookupCategory>> GetLookupCategoryById(long id) | ||||
|         { | ||||
|             var result = await _lookupRepo.GetLookupCategoryById(id); | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|         public async Task<DataResult<List<LookupCategory>>> GetLookupCategoryByName(string categoryName) | ||||
|         { | ||||
|             var result = await _lookupRepo.GetLookupCategoryByName(categoryName); | ||||
|             return result; | ||||
|         } | ||||
|  | ||||
|         public async Task<DataResult<List<LookupCategory>>> GetActiveLookupCategories() | ||||
|         { | ||||
|             var result = await _lookupRepo.GetActiveLookupCategories(); | ||||
|             return result; | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user