本文整理汇总了C#中StoreProcedure.ExecuteReaderTransactioned方法的典型用法代码示例。如果您正苦于以下问题:C# StoreProcedure.ExecuteReaderTransactioned方法的具体用法?C# StoreProcedure.ExecuteReaderTransactioned怎么用?C# StoreProcedure.ExecuteReaderTransactioned使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StoreProcedure
的用法示例。
在下文中一共展示了StoreProcedure.ExecuteReaderTransactioned方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetByRole
public static List<Funcionalidad> GetByRole(Rol role, SqlTransaction transaction)
{
//Obtengo todas las funcionalidades asociadas a determinado rol (transaccionado)
var param = new List<SPParameter> { new SPParameter("ID_Rol", role.ID) };
var sp = new StoreProcedure(DataBaseConst.Funcionalidad.SPGetAllFuncionalidadByRol, param, transaction);
//Retorno una lista de Funcionalidad a partir de un ExecuteReader transaccionado
return sp.ExecuteReaderTransactioned<Funcionalidad>(transaction);
}
示例2: GetLastOfertaByPublication
public static Oferta GetLastOfertaByPublication(int idPublicacion, SqlTransaction transaction)
{
var param = new List<SPParameter> { new SPParameter("idPublicacion", idPublicacion)};
var sp = new StoreProcedure(DataBaseConst.Oferta.SPGetLastOfertaByPublication, param, transaction);
var offers = (transaction == null) ? sp.ExecuteReader<Oferta>() : sp.ExecuteReaderTransactioned<Oferta>(transaction);
if (offers == null || offers.Count == 0)
return null;
return offers[0];
}
示例3: GetById
public static FormaPago GetById(int idPaymentMethod, SqlTransaction transaction)
{
var param = new List<SPParameter> { new SPParameter("ID_Forma_Pago", idPaymentMethod) };
var sp = new StoreProcedure(DataBaseConst.FormaPago.SPGetAllFormaPagoById, param, transaction);
var statusPublication = sp.ExecuteReaderTransactioned<FormaPago>(transaction);
if (statusPublication == null || statusPublication.Count == 0)
return null;
return statusPublication[0];
}
示例4: ObtenerIdTipoPorDescripcion
public static Butaca ObtenerIdTipoPorDescripcion(string descripcion, SqlTransaction transaction)
{
var param = new List<SPParameter> { new SPParameter("Descripcion", descripcion) };
var sp = new StoreProcedure(DBQueries.Butaca.SPGetIdTipoPorDescripcion, param, transaction);
var butacas = sp.ExecuteReaderTransactioned<Butaca>(transaction);
if (butacas == null || butacas.Count == 0)
return null;
return butacas[0];
}
示例5: GetByBusinessName
public static Empresa GetByBusinessName(string businessName, SqlTransaction transaction)
{
var param = new List<SPParameter> { new SPParameter("Razon_Social", businessName) };
var sp = new StoreProcedure(DataBaseConst.Empresa.SPGetCompanyByBusinessName, param, transaction);
var users = sp.ExecuteReaderTransactioned<Empresa>(transaction);
if (users == null || users.Count == 0)
return null;
return users[0];
}
示例6: ObtenerTipoPorDescripcion
public static TipoButaca ObtenerTipoPorDescripcion(string tipo, SqlTransaction transaction)
{
var param = new List<SPParameter> { new SPParameter("Tipo", tipo)};
var sp = new StoreProcedure(DBQueries.TipoButaca.SPGetTipoPorDescripcion, param, transaction);
var tipos = sp.ExecuteReaderTransactioned<TipoButaca>(transaction);
if (tipos == null || tipos.Count == 0)
return null;
return tipos[0];
}
示例7: ObtenerServicioPorNombre
public static Servicio ObtenerServicioPorNombre(string servicio, SqlTransaction transaction)
{
var param = new List<SPParameter>{new SPParameter("TipoServicio",servicio),};
var sp = new StoreProcedure(DBQueries.Servicio.SPObtenerServicioPorNombre, param, transaction);
var servicios = sp.ExecuteReaderTransactioned<Servicio>(transaction);
if (servicios == null || servicios.Count == 0)
return null;
return servicios[0];
}
示例8: GetByDocument
public static Cliente GetByDocument(int tipoDocumento, int nroDocumento, SqlTransaction transaction)
{
var param = new List<SPParameter>
{
new SPParameter("Tipo_documento", tipoDocumento),
new SPParameter("Nro_documento", nroDocumento)
};
var sp = new StoreProcedure(DataBaseConst.Cliente.SPGetClientByDocument, param, transaction);
var users = sp.ExecuteReaderTransactioned<Cliente>(transaction);
if (users == null || users.Count == 0)
return null;
return users[0];
}
示例9: GetAll
public static List<TipoDocumento> GetAll(SqlTransaction transaction)
{
var sp = new StoreProcedure(DataBaseConst.TipoDocumento.SPGetAllTipoDocumento, null, transaction);
return sp.ExecuteReaderTransactioned<TipoDocumento>(transaction);
}
示例10: GetByPhone
public static Cliente GetByPhone(string phone, SqlTransaction transaction)
{
var param = new List<SPParameter> { new SPParameter("Telefono", phone) };
var sp = new StoreProcedure(DataBaseConst.Cliente.SPGetClientByPhone, param, transaction);
var users = sp.ExecuteReaderTransactioned<Cliente>(transaction);
if (users == null || users.Count == 0)
return null;
return users[0];
}
示例11: GetByCUIT
public static Empresa GetByCUIT(string cuit, SqlTransaction transaction)
{
var param = new List<SPParameter> { new SPParameter("CUIT", cuit) };
var sp = new StoreProcedure(DataBaseConst.Empresa.SPGetCompanyByCUIT, param, transaction);
var users = sp.ExecuteReaderTransactioned<Empresa>(transaction);
if (users == null || users.Count == 0)
return null;
return users[0];
}
示例12: ObtenerTodos
public static List<TipoButaca> ObtenerTodos(SqlTransaction transaction)
{
//Obtengo la lista de tipos de butacas almacenadas en la base de datos
var sp = new StoreProcedure(DBQueries.TipoButaca.SPGetTiposButacas,null,transaction);
return sp.ExecuteReaderTransactioned<TipoButaca>(transaction);
}
示例13: ObtenerViajesPorAeronave
public static List<Viaje> ObtenerViajesPorAeronave(Aeronave aeronave, SqlTransaction transaction)
{
var param = new List<SPParameter> { new SPParameter("ID_Aeronave", aeronave.ID) };
var sp = new StoreProcedure(DBQueries.Viaje.SPGetViajesPorAeronave, param, transaction);
var viajes = sp.ExecuteReaderTransactioned<Viaje>(transaction);
if (viajes == null || viajes.Count == 0)
return null;
return viajes;
}
示例14: ObtenerPorMatricula
public static Aeronave ObtenerPorMatricula(string matricula, SqlTransaction transaction)
{
var param = new List<SPParameter> { new SPParameter("Matricula", matricula) };
var sp = new StoreProcedure(DBQueries.Aeronave.SPGetAeronavePorMatricula, param, transaction);
var aeronaves = sp.ExecuteReaderTransactioned<Aeronave>(transaction);
if (aeronaves == null || aeronaves.Count == 0)
return null;
return aeronaves[0];
}