示例#1
0
        public async Task <int> AddAsync(Parceiro cadastro)
        {
            using (var context = new LiraContext())
            {
                await context.AddAsync(cadastro);

                return(await context.SaveChangesAsync());
            }
        }
示例#2
0
        public async Task <int> AddAsync(Produto produto)
        {
            using (var context = new LiraContext())
            {
                await context.AddAsync(produto);

                return(await context.SaveChangesAsync());
            }
        }