public static async Task <Models.SqlServer.Enriquecimento.SpGetInformacoesJob> SpGetInformacoesJobAsync(int origemAppsettingsJson, long idFila) { var parametros = new DynamicParameters(); Models.SqlServer.Enriquecimento.SpGetInformacoesJob spGetInformacoesJob = new Models.SqlServer.Enriquecimento.SpGetInformacoesJob(); List <Models.SqlServer.Enriquecimento.SpGetInformacoesJob> list = new List <Models.SqlServer.Enriquecimento.SpGetInformacoesJob>(); parametros.Add("@IdFila", idFila, DbType.Int64, ParameterDirection.Input, null); using (SqlConnection db = new SqlConnection(Utils.AppConfiguration.GetAppConfiguration(origemAppsettingsJson).GetConnectionString(connectionString))) { var result = await db.QueryAsync <Models.SqlServer.Enriquecimento.SpGetInformacoesJob>( "[SpGetInformacoesJob]", parametros, commandType : CommandType.StoredProcedure); if (result != null) { list = result.ToList <Models.SqlServer.Enriquecimento.SpGetInformacoesJob>(); } } if ((list != null) && (list.Count > 0)) { spGetInformacoesJob = list.First(); } else { spGetInformacoesJob = new Models.SqlServer.Enriquecimento.SpGetInformacoesJob(); } return(spGetInformacoesJob); }
public static async Task <Models.SqlServer.Enriquecimento.SpGetInformacoesJob> RetornarInformacoesJobAsync(int origemAppsettingsJson, long idFila) { { Models.SqlServer.Enriquecimento.SpGetInformacoesJob spGetInformacoesJob = new Models.SqlServer.Enriquecimento.SpGetInformacoesJob(); spGetInformacoesJob = await Data.SqlServer.Enriquecimento.Procedures.SpGetInformacoesJobAsync(origemAppsettingsJson, idFila); return(spGetInformacoesJob); } }
public static Models.SqlServer.Enriquecimento.SpGetInformacoesJob RetornarInformacoesJob(int origemAppsettingsJson, long idFila) { Models.SqlServer.Enriquecimento.SpGetInformacoesJob spGetInformacoesJob = new Models.SqlServer.Enriquecimento.SpGetInformacoesJob(); spGetInformacoesJob = Data.SqlServer.Enriquecimento.Procedures.SpGetInformacoesJob(origemAppsettingsJson, idFila); return(spGetInformacoesJob); }