public async Task <User> Add(User user)
        {
            await _serverFixture.ExecuteDbContextAsync(async context =>
            {
                await context.User.AddAsync(user);
                await context.SaveChangesAsync();
            });

            return(user);
        }
Example #2
0
        public async Task <Rol> Add(Rol rol)
        {
            await _serverFixture.ExecuteDbContextAsync(async context =>
            {
                await context.Rol.AddAsync(rol);
                await context.SaveChangesAsync();
            });

            return(rol);
        }