public ReimprimirBo() { InitializeComponent(); timer1.Start(); _context = Initializecontext.initcontext(); _detallehelper = new ServicesInjector <Detallefactura>(_context); }
public static void RegisterServices(IServiceCollection services) { var mappingConfig = new MapperConfiguration(mc => { mc.AddProfile(new ServicesMapperProfile()); }); IMapper mapper = mappingConfig.CreateMapper(); services.AddSingleton(mapper); RepositoriesInjector.RegisterServices(services); ServicesInjector.RegisterServices(services); var key = Encoding.ASCII.GetBytes(SecuritySettings.Secret); services.AddAuthentication(x => { x.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; x.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; }) .AddJwtBearer(x => { x.RequireHttpsMetadata = false; x.SaveToken = true; x.TokenValidationParameters = new TokenValidationParameters { ValidateIssuerSigningKey = true, IssuerSigningKey = new SymmetricSecurityKey(key), ValidateIssuer = false, ValidateAudience = false }; }); }
public ProveedoresForm() { InitializeComponent(); timer1.Start(); _context = Initializecontext.initcontext(); _proveedoreshelper = new ServicesInjector <Persona>(_context); InitLv(); }
public Compras() { InitializeComponent(); _context = Initializecontext.initcontext(); _compraservice = new ServicesInjector <Compra>(_context); timer1.Start(); Init(); }
public EditarCuenta() { InitializeComponent(); _context = Initializecontext.initcontext(); _usuariohelper = new ServicesInjector <Usuario>(_context); _rolhelper = new ServicesInjector <Rol>(_context); _rolusuariohelper = new ServicesInjector <Rolusuario>(_context); Init(); }
private void ConfigureInjection(IServiceCollection services) { services.AddSingleton(ConfigureMapper()); services.AddScoped <IDbConnection>(_ => GetConnection()); AcceInjector.Config(services); ServicesInjector.Config(services); RepositoriesInjector.Config(services); }
public static void AddDependencyInjectionConfiguration(this IServiceCollection services) { if (services == null) { throw new ArgumentNullException(nameof(services)); } ServicesInjector.RegisterServices(services); }
public Catalogo() { InitializeComponent(); timer1.Start(); _context = Initializecontext.initcontext(); _inventariohelper = new ServicesInjector <Inventario>(_context); _precioproductohelper = new ServicesInjector <Precioproducto>(_context); _productohelper = new ServicesInjector <Producto>(_context); InitList(); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddRazorPages().AddRazorRuntimeCompilation(); //Database Settings services.AddDatabaseConfiguration(Configuration); //Transient/scoped/singleton services ServicesInjector.RegisterServices(services); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { //API Configs services.AddControllers(); //Database configs services.AddDatabaseConfiguration(Configuration); //Transient/scoped/singleton services ServicesInjector.RegisterServices(services); }
public CompraExistente() { InitializeComponent(); _context = Initializecontext.initcontext(); _productoservices = new ServicesInjector <Producto>(_context); _proveedorservices = new ServicesInjector <Proveedores>(_context); _inventarioservices = new ServicesInjector <Inventario>(_context); _compraservices = new ServicesInjector <Compra>(_context); _precioservices = new ServicesInjector <Precioproducto>(_context); _comprahelper = new Helper <Compra>(_context); Init(); }
public CompraNueva() { InitializeComponent(); _context = Initializecontext.initcontext(); _productohelper = new Helper <Producto>(_context); _comprahelper = new Helper <Compra>(_context); _categoriahelper = new Helper <Categoria>(_context); _marcahelper = new Helper <Marca>(_context); _presentacionhelper = new Helper <Presentacion>(_context); _proveedorhelper = new ServicesInjector <Proveedores>(_context); _usuariohelper = new Helper <Usuario>(_context); _preciohelper = new Helper <Precioproducto>(_context); _inventariohelper = new Helper <Inventario>(_context); Initialize(); }