Exemplo n.º 1
0
        public async Task <Entities.User_form> Create(Entities.User_form users_forms)
        {
            await _context.Users_forms.AddAsync(users_forms);

            await _context.SaveChangesAsync();

            return(users_forms);
        }
Exemplo n.º 2
0
        public async Task <Entities.User_form> Update(Entities.User_form newUF)
        {
            var users_forms = await _context.Users_forms.FindAsync(newUF.Id);

            if (users_forms == null)
            {
                return(null);
            }
            if (newUF.Id != users_forms.Id)
            {
                return(null);
            }
            _context.Users_forms.Update(newUF);
            await _context.SaveChangesAsync();

            return(users_forms);
        }