You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
982 B
29 lines
982 B
2 years ago
|
using System.Threading.Tasks;
|
||
|
using Znyc.Recruitment.Admin.Commons.Services;
|
||
|
using Znyc.Recruitment.Admin.Security.Dtos;
|
||
|
using Znyc.Recruitment.Admin.Security.Entitys;
|
||
|
using Znyc.Recruitment.Admin.Security.IRepositories;
|
||
|
using Znyc.Recruitment.Admin.Security.IServices;
|
||
|
|
||
|
namespace Znyc.Recruitment.Admin.Security.Services
|
||
|
{
|
||
|
public class ApiService : BaseService<ApiEntity, ApiOutputDto, long>, IApiService
|
||
|
{
|
||
|
private readonly IApiRepository _apiRepository;
|
||
|
|
||
|
/// <summary>
|
||
|
/// </summary>
|
||
|
/// <param name="repository"></param>
|
||
|
public ApiService(IApiRepository repository) : base(repository)
|
||
|
{
|
||
|
_apiRepository = repository;
|
||
|
}
|
||
|
|
||
|
public async Task<ApiEntity> GetApiAsync(string apiUrl)
|
||
|
{
|
||
|
string key = string.Format(@"ApiUrl='{0}'", apiUrl);
|
||
|
ApiEntity result = await _apiRepository.GetWhereAsync(key); //x => x.ApiUrl == apiUrl
|
||
|
return result;
|
||
|
}
|
||
|
}
|
||
|
}
|