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.
30 lines
905 B
30 lines
905 B
using System.Threading.Tasks;
|
|
using Znyc.Admin.Commons.Services;
|
|
using Znyc.Admin.Security.Dtos;
|
|
using Znyc.Admin.Security.Entitys;
|
|
using Znyc.Admin.Security.IRepositories;
|
|
using Znyc.Admin.Security.IServices;
|
|
|
|
namespace Znyc.Admin.Security.Services
|
|
{
|
|
public class ApiService : BaseService<Api, ApiOutputDto, long>, IApiService
|
|
{
|
|
private readonly IApiRepository _apiRepository;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="repository"></param>
|
|
public ApiService(IApiRepository repository) : base(repository)
|
|
{
|
|
_apiRepository = repository;
|
|
}
|
|
|
|
public async Task<Api> GetApiAsync(string apiUrl)
|
|
{
|
|
string key = string.Format(@"ApiUrl='{0}'", apiUrl);
|
|
var result = await _apiRepository.GetWhereAsync(key);//x => x.ApiUrl == apiUrl
|
|
return result;
|
|
}
|
|
}
|
|
}
|
|
|