示例#1
0
        public bool PostExchanges(Exchange exchange, string userEmail)
        {
            var userCtx = userRepo.ListarNoTracking(x => x.Email == userEmail).FirstOrDefault();

            exchange.DtExchange = DateTime.Now;
            exchange.UserId     = userCtx.Id;

            repo.Inserir(exchange);

            var success = repo.Savechanges();

            return(success > 0);
        }