コード例 #1
0
    public Task <Data> LoadAsync(int id)
    {
        //this database's driver does not have aysnc methods, because it's old or done poorly.
        var result = NotNiceDataBaseDriver.LoadData(id);

        return(Task.FromResult(result));
    }
コード例 #2
0
    public Task <Data> LoadAsync(int id)
    {
        var data = NotNiceDataBaseDriver.LoadData(id);

        return(Task.From(data));
    }