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
964 B
29 lines
964 B
using System.Threading.Tasks;
|
|
using Znyc.Cloudcar.Admin.Commons.Services;
|
|
using Znyc.Cloudcar.Admin.Security.Dtos;
|
|
using Znyc.Cloudcar.Admin.Security.Entitys;
|
|
using Znyc.Cloudcar.Admin.Security.IRepositories;
|
|
using Znyc.Cloudcar.Admin.Security.IServices;
|
|
|
|
namespace Znyc.Cloudcar.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;
|
|
}
|
|
}
|
|
}
|