public async Task <Game_DTO> Get_Details_By_Url_Platform_n_Condition(string NameUrl, string PlatformUrl, int Condition_Id) { var result = new Game_DTO(); using (var con = DbHelper.GetSqlConnection()) { using (var multiple = await con.QueryMultipleAsync(Get_Details_By_Url_Platform_n_ConditionSP, new { NameUrl, PlatformUrl, Condition_Id }, commandType: CommandType.StoredProcedure)) { result.Game = multiple.ReadFirstOrDefault <Game>(); result.ImageList = multiple.Read <Images>(); result.ReleaseDates = multiple.Read <Game_Release_Date>(); result.Reviews = multiple.Read <Review>(); result.VideoList = multiple.Read <Video>(); } } return(result); }
public async Task <Game_DTO> Get_Details_By_Id(long id) { var result = new Game_DTO(); using (var con = DbHelper.GetSqlConnection()) { using (var multiple = await con.QueryMultipleAsync(Get_Details_By_IdSP, new { id }, commandType: CommandType.StoredProcedure)) { result.Game = multiple.ReadFirstOrDefault <Game>(); result.ImageList = multiple.Read <Images>(); result.ReleaseDates = multiple.Read <Game_Release_Date>(); result.Reviews = multiple.Read <Review>(); result.VideoList = multiple.Read <Video>(); result.GamePlatformMapings = multiple.Read <GamePlatformMaping>(); } } return(result); }