public Task Delete(object Id) { UserDeck exists = table.Find(Id); table.Remove(exists); return(Task.Run(() => _context.SaveChangesAsync())); }
public Task Delete(Guid Id) { Subscribe exists = table.Find(Id); table.Remove(exists); return(Task.Run(() => _context.SaveChangesAsync())); }
public Task Delete(Guid Id) { var subscriptions = _context.Subscribes.Where(p => p.Publisher_Id == Id); _context.Subscribes.RemoveRange(subscriptions); subscriptions = _context.Subscribes.Where(f => f.Follower_Id == Id); _context.Subscribes.RemoveRange(subscriptions); User exists = table.Find(Id); table.Remove(exists); return(Task.Run(() => _context.SaveChangesAsync())); }
public async Task Insert(Session session) { await table.AddAsync(session); _context.SaveChangesAsync(); }
public Task Insert(Deck deck) { _context.Add(deck); return(_context.SaveChangesAsync()); }