当前位置: 首页>>代码示例>>C#>>正文


C# StoreProcedure.ExecuteReaderTransactioned方法代码示例

本文整理汇总了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);
        }
开发者ID:norchow,项目名称:gestiondedatos,代码行数:9,代码来源:FuncionalidadPersistance.cs

示例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];
        }
开发者ID:norchow,项目名称:gestiondedatos,代码行数:11,代码来源:OfertaPersistance.cs

示例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];
        }
开发者ID:norchow,项目名称:gestiondedatos,代码行数:12,代码来源:FormaPagoPersistance.cs

示例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];
        }
开发者ID:mjarabroviski,项目名称:GDD,代码行数:12,代码来源:ButacaPersistencia.cs

示例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];
        }
开发者ID:norchow,项目名称:gestiondedatos,代码行数:12,代码来源:EmpresaPersistance.cs

示例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];
        }
开发者ID:mjarabroviski,项目名称:GDD,代码行数:12,代码来源:TipoButacaPersistencia.cs

示例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];
        }
开发者ID:mjarabroviski,项目名称:GDD,代码行数:12,代码来源:ServicioPersistencia.cs

示例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];
        }
开发者ID:norchow,项目名称:gestiondedatos,代码行数:16,代码来源:ClientePersistance.cs

示例9: GetAll

 public static List<TipoDocumento> GetAll(SqlTransaction transaction)
 {
     var sp = new StoreProcedure(DataBaseConst.TipoDocumento.SPGetAllTipoDocumento, null, transaction);
     return sp.ExecuteReaderTransactioned<TipoDocumento>(transaction);
 }
开发者ID:norchow,项目名称:gestiondedatos,代码行数:5,代码来源:TipoDocumentoPersistance.cs

示例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];
        }
开发者ID:norchow,项目名称:gestiondedatos,代码行数:12,代码来源:ClientePersistance.cs

示例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];
        }
开发者ID:norchow,项目名称:gestiondedatos,代码行数:12,代码来源:EmpresaPersistance.cs

示例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);
 }
开发者ID:mjarabroviski,项目名称:GDD,代码行数:6,代码来源:TipoButacaPersistencia.cs

示例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;
        }
开发者ID:mjarabroviski,项目名称:GDD,代码行数:12,代码来源:ViajePersistencia.cs

示例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];
        }
开发者ID:mjarabroviski,项目名称:GDD,代码行数:12,代码来源:AeronavePersistencia.cs


注:本文中的StoreProcedure.ExecuteReaderTransactioned方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。