Ejemplo n.º 1
0
        public async Task <User> AddUser(User user)
        {
            var newClient = await context.Users.AddAsync(user);

            await context.SaveChangesAsync();

            return(user);
        }
Ejemplo n.º 2
0
        public async Task AddDealer(Dealer dealer)
        {
            var newDealer = new Dealer()
            {
                UserName     = dealer.UserName.ToLower(),
                Password     = dealer.Password,
                EmailAddress = dealer.EmailAddress.ToLower()
            };
            await context.Dealers.AddAsync(newDealer);

            await context.SaveChangesAsync();
        }