Exemple #1
0
        public async Task DeleteAsync(int id)
        {
            using var context = new mmpproject2Context(_contextOptions);
            var ast = await context.Assets.FirstAsync(a => a.Id == id);

            context.Remove(ast);

            await context.SaveChangesAsync();
        }
        public async Task DeleteAsync(int id)
        {
            using var context = new mmpproject2Context(_contextOptions);
            var tr = await context.Trades.FirstAsync(t => t.Id == id);

            context.Remove(tr);

            await context.SaveChangesAsync();
        }
Exemple #3
0
        public async Task DeleteAsync(int id)
        {
            using var context = new mmpproject2Context(_contextOptions);
            var dbStock = await context.Stocks.FirstAsync(s => s.Id == id);

            context.Remove(dbStock);

            await context.SaveChangesAsync();
        }
        public async Task DeleteAsync(int id)
        {
            using var context = new mmpproject2Context(_contextOptions);
            var portfolio = await context.Portfolios.FindAsync(id);

            context.Remove(portfolio);

            await context.SaveChangesAsync();
        }
        public async Task DeleteAsync(int id)
        {
            using var context = new mmpproject2Context(_contextOptions);
            var user = await context.Users.FindAsync(id);

            context.Remove(user);

            await context.SaveChangesAsync();
        }