18 lines
385 B
C#
18 lines
385 B
C#
using System.Threading.Tasks;
|
|||
|
|
|
||
|
|
public interface IDataService
|
||
|
|
{
|
||
|
|
Task<string> GetCoreAsync(int id, bool sync = false);
|
||
|
|
}
|
||
|
|
|
||
|
|
public class BusinessLogic
|
||
|
|
{
|
||
|
|
private readonly IDataService _dataService;
|
||
|
|
public BusinessLogic(IDataService dataService) { _dataService = dataService; }
|
||
|
|
|
||
|
|
private async Task<string> GetFrobCoreAsync()
|
||
|
|
{
|
||
|
|
return await _dataService.GetCoreAsync(17);
|
||
|
|
}
|
||
|
|
}
|