public CustomerServiceTest() { var options = new DbContextOptionsBuilder <DesafioContext>() .UseInMemoryDatabase(databaseName: "Desafio_Memory_AddTest") .Options; context = new DesafioContext(options); var service = new Service.Customer.CustomerService(context); service.Save(new Domain.Models.Customer() { Email = "*****@*****.**", Name = "Gesualdo Crocco" }); service.Save(new Domain.Models.Customer() { Email = "*****@*****.**", Name = "Gesualdo Crocco 1" }); service.Save(new Domain.Models.Customer() { Email = "*****@*****.**", Name = "Gesualdo Crocco 2" }); service.Save(new Domain.Models.Customer() { Email = "*****@*****.**", Name = "Gesualdo Crocco 3" }); }
public async Task <IActionResult> List([FromServices] DesafioContext desafioContext, [FromQuery] bool isAdvencedPaymented) { var list = desafioContext.Transactions .Where(transaction => (isAdvencedPaymented && transaction.PassedOnAt == null) || (!isAdvencedPaymented)) .ToList() .OrderByDescending(p => p.CreatedAt); return(Ok(list)); }
public AuthController(IOptions <AppSettings> appSettings, DesafioContext context) { _appSettings = appSettings.Value; _context = context; }
public MarcaSeed(DesafioContext context) { _context = context; }
public PatrimoniosController(DesafioContext context) { _context = context; }
public MarcasRepository(DesafioContext context) { _context = context; }
public CartaoRepository(DesafioContext dbContext) { _dbContext = dbContext; }
public CompanyRepository(DesafioContext context) : base(context) { }
public EquipeRepositorio(DesafioContext context, IConfiguration conf) { _conf = conf; _context = context; }
public AssuntoRepository(DesafioContext dbContext) : base(dbContext) { }
public RepositoryUsuario(DesafioContext context) : base(context) { _context = context; }
public ClienteController(DesafioContext context) { _context = context; dbSet = context.Cliente; }
public MarcasController(DesafioContext context) { _context = context; }
public LivroAutorRepository(DesafioContext dbContext) : base(dbContext) { }
public UserRepository(DesafioContext context) : base(context) { }
public AuthRepository(DesafioContext desafioContext) { erros = new List <string>(); this.desafioContext = desafioContext; }
public UsuarioValidator(DesafioContext context) { _context = context; }
public PatrimonioRepository(DesafioContext context) { _context = context; }
public LivroRepository(DesafioContext dbContext) : base(dbContext) { _dbContext = dbContext; }
public RickController(DesafioContext context) { rickService = new RickService(context); }
public async Task <IActionResult> List([FromServices] DesafioContext desafioContext) { return(Ok(desafioContext.Transactions.ToList().OrderByDescending(p => p.CreatedAt))); }
public HomeController(IColaboradorRepositorio colaboradorRepositorio, IEquipeRepositorio equipeRepositorio, DesafioContext context) { _colaboradorRepositorio = colaboradorRepositorio; _equipeRepositorio = equipeRepositorio; _context = context; }
protected RepositoryAsync(DesafioContext dbContext) { _dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); _dbSet = _dbContext.Set <TEntity>(); }
public LoteArquivoRepository(DesafioContext dbContext) { _dbContext = dbContext; }
public CidadeController(DesafioContext context) { _context = context; dbSet = context.Cidade; }
/// <summary> /// Initializes a new instance of the Customer Service /// </summary> /// <param name="desafioContext"></param> public CustomerService(DesafioContext desafioContext) { _desafioContext = desafioContext; }
public PaymentDomain(DesafioContext desafioContext) { _desafioContext = desafioContext; }
public Repository(DesafioContext context) { _context = context; _entity = _context.Set <TEntity>(); }
public PatrimonioValidator(DesafioContext context) { _context = context; }
public UsuarioSeed(DesafioContext context) { _context = context; }