Esempio n. 1
0
        public async Task Save(Venue model)
        {
            var a = 0;

            foreach (var item in context.Venues)
            {
                if (item == model)
                {
                    a++;
                }
            }

            if (a == 0)
            {
                await context.Venues.AddAsync(model);

                await context.SaveChangesAsync();
            }
        }
Esempio n. 2
0
        public async Task Save(Order model)
        {
            await context.Orders.AddAsync(model);

            await context.SaveChangesAsync();
        }
Esempio n. 3
0
 public async Task Save(User model)
 {
     context.Users.Update(model);
     await context.SaveChangesAsync();
 }
Esempio n. 4
0
        public async Task Save(Ticket model)
        {
            await context.Tickets.AddAsync(model);

            await context.SaveChangesAsync();
        }