Exemplo n.º 1
0
        public async Task <Participant> Add(Participant participant)
        {
            // use db function to add participant
            await _context.Participants.AddAsync(participant);

            await _context.SaveChangesAsync();

            return(participant);
        }
Exemplo n.º 2
0
        public async Task <Email> Add(Email email)
        {
            // use db function to add email
            await _context.Emails.AddAsync(email);

            await _context.SaveChangesAsync();

            return(email);
        }
Exemplo n.º 3
0
        public async Task <Event> Add(Event ev)
        {
            // use db function to add event
            await _context.Events.AddAsync(ev);

            await _context.SaveChangesAsync();

            return(ev);
        }
        public async Task <Form> Add(Form form)
        {
            // use db function to add form
            await _context.Forms.AddAsync(form);

            await _context.SaveChangesAsync();

            return(form);
        }
Exemplo n.º 5
0
        public async Task <History> Add(History history)
        {
            // use db function to add history
            await _context.Histories.AddAsync(history);

            await _context.SaveChangesAsync();

            return(history);
        }
        public async Task <User> Add(User user)
        {
            // use db function to add user
            await _context.Users.AddAsync(user);

            await _context.SaveChangesAsync();

            return(user);
        }
Exemplo n.º 7
0
 public async Task <int> SaveChanges()
 {
     return(await Db.SaveChangesAsync());
 }