private FuncaoRequisicaoServices(ISqlBase sqlBase, IsolationLevel isolationLevel) { this.isolationLevel = isolationLevel; this.optionsBuilder = new DbContextOptionsBuilder <UsuarioContexto>(); this.optionsBuilder.UseSqlServer(sqlBase.getConnection()); this.usuarioContexto = new UsuarioContexto(optionsBuilder.Options); }
protected TipoServicoAbstract(ISqlBase sqlBase, IsolationLevel isolationLevel, string token) { this.token = token; this.isolationLevel = isolationLevel; this.optionsBuilder = new DbContextOptionsBuilder <ServicoContexto>(); this.optionsBuilder.UseSqlServer(sqlBase.getConnection()); }
public async Task <ActionResult <IEnumerable <RequisicaoTableViewModel> > > getUsuarioRequisicao([FromBody] DataTablesResponseViewModel model) { string filtro = model.Search.Value; int ordernar = model.Order[0].Column; string ordernarDirecao = model.Order[0].Dir; int _draw = model.Draw; int startRec = model.Start; int pageSize = model.Length; IsolationLevel _isolationLevel = IsolationLevel.ReadUncommitted; ISqlBase sqlBase = SqlServerFactory.Create(); GerenciarUsuario gerenciarUsuario = GerenciarUsuario.Create(sqlBase, _isolationLevel); IList <IdentityUserClaim <string> > usuarios = await gerenciarUsuario.getRequisicoes(startRec, filtro, pageSize, model.empresaUsuarioFuncao.EmpresaId, model.empresaUsuarioFuncao.UsuarioId); IList <RequisicaoTableViewModel> tableRequisicao = ((List <IdentityUserClaim <string> >)usuarios).ConvertAll(new Converter <IdentityUserClaim <string>, RequisicaoTableViewModel>(UsuarioConverter.converterIdentityUserClaimParaClaim)); List <RequisicaoTableViewModel> requisicoesOrdenadas = UsuarioConfiguracao.ordenacaoTableUsuarioRequisicoes(ordernar, ordernarDirecao, tableRequisicao); int totalRegistros = gerenciarUsuario.totalRegistro; var retorno = this.Json(new { draw = _draw, recordsTotal = totalRegistros, recordsFiltered = totalRegistros, data = requisicoesOrdenadas }); return(retorno); }
private GerenciarUsuario(ISqlBase sqlBase, IsolationLevel isolationLevel) { this._isolationLevel = isolationLevel; this._sqlBase = sqlBase; this._optionsBuilder = new DbContextOptionsBuilder <UsuarioContexto>(); this._optionsBuilder.UseSqlServer(sqlBase.getConnection()); }
public async Task <ActionResult <IEnumerable <RequisicaoTableViewModel> > > getsRequisicoes([FromBody] DataTablesResponseViewModel model) { string filtro = model.Search.Value; int ordernar = model.Order[0].Column; string ordernarDirecao = model.Order[0].Dir; int _draw = model.Draw; int startRec = model.Start; int pageSize = model.Length; IsolationLevel _isolationLevel = IsolationLevel.ReadUncommitted; ISqlBase sqlBase = SqlServerFactory.Create(); FuncaoManager funcaoManager = FuncaoManager.Create(sqlBase, _isolationLevel); List <IdentityRoleClaim <string> > funcoesRequisicoes = await funcaoManager.getsRequisicoes(model.empresaUsuarioFuncao.FuncaoId, startRec, filtro, pageSize); IList <RequisicaoTableViewModel> tableFuncaoRequisicao = funcoesRequisicoes.ConvertAll(new Converter <IdentityRoleClaim <string>, RequisicaoTableViewModel>(FuncaoConverter.converterIdentityRoleClaimParaClaim)); IList <RequisicaoTableViewModel> funcoesRequisicoesOrdenadas = FuncaoConfiguracao.ordenacaoTableFuncoesRequisicoes(ordernar, ordernarDirecao, tableFuncaoRequisicao); int totalRegistros = funcaoManager.totalRegistro; var retorno = this.Json(new { draw = _draw, recordsTotal = totalRegistros, recordsFiltered = totalRegistros, data = funcoesRequisicoesOrdenadas }); return(retorno); }
private EmpresaServices(ISqlBase sqlBase, IsolationLevel isolationLevel) { this.isolationLevel = isolationLevel; this.optionsBuilder = new DbContextOptionsBuilder <EmpresaContexto>(); this.optionsBuilder.UseSqlServer(sqlBase.getConnection()); this.repositorio = EmpresaRepositorio.Create(this.optionsBuilder.Options, isolationLevel); }
/// <param name="identifierLeft">The left char to enclose a table or column name with.</param> /// <param name="identifierRight">The right char to enclose a table or column name with.</param> /// <param name="useParameters">Should all value be parameterized.</param> public SqlOptions(char identifierLeft, char identifierRight, ISqlBase sqlBase, bool useParameters = true) { ItemIdCount = 0; IdentifierLeft = identifierLeft; IdentifierRight = identifierRight; SqlBase = sqlBase; UseParameters = useParameters; if (useParameters) { SqlItems = new List <SqlItem>(); } }
protected PagamentoAbstract(ISqlBase sqlBase, IsolationLevel isolationLevel) { this.isolationLevel = isolationLevel; this.optionsBuilder = new DbContextOptionsBuilder <ServicoContexto>(); this.optionsBuilder.UseSqlServer(sqlBase.getConnection()); }
internal static EmpresaUsuarioServices Create(ISqlBase sqlBase, IsolationLevel isolationLevel) { return(new EmpresaUsuarioServices(sqlBase, isolationLevel)); }
private EmpresaUsuarioServices(ISqlBase sqlBase, IsolationLevel isolationLevel) { this.isolationLevel = isolationLevel; this.optionsBuilder = new DbContextOptionsBuilder <EmpresaContexto>(); this.optionsBuilder.UseSqlServer(sqlBase.getConnection()); }
private TipoServicoServices(ISqlBase sqlBase, IsolationLevel isolationLevel) : base(sqlBase, isolationLevel) { this.Repositorio = TipoServicoRepositorio.Create(this.optionsBuilder.Options, isolationLevel); }
internal static FuncaoManager Create(ISqlBase sqlBase, IsolationLevel isolationLevel) { return(new FuncaoManager(sqlBase, isolationLevel)); }
internal static PagamentoAbstract Create(ISqlBase sqlBase, IsolationLevel isolationLevel) { return(new PagamentoServices(sqlBase, isolationLevel)); }
internal static TipoServicesAdmin Create(ISqlBase sqlBase, IsolationLevel isolationLevel, string token) { return(new TipoServicesAdmin(sqlBase, isolationLevel, token)); }
private TipoServicesAdmin(ISqlBase sqlBase, IsolationLevel isolationLevel, string token) : base(sqlBase, isolationLevel, token) { this.Repositorio = TipoServicoRepositorio.Create(this.optionsBuilder.Options, isolationLevel); }
private ServicoFactory(IsolationLevel isolationLevel) { sqlBase = SqlServerFactory.Create(); this.isolationLevel = isolationLevel; }
internal static FuncaoServices Create(ISqlBase sqlBase, IsolationLevel isolationLevel) { return(new FuncaoServices(sqlBase, isolationLevel)); }
internal static GerenciarUsuario Create(ISqlBase sqlBase, IsolationLevel isolationLevel) { return(new GerenciarUsuario(sqlBase, isolationLevel)); }