public void Delete(int id)
 {
     using (var db = new LiteDB.LiteRepository(new LiteDatabase(dirBanco)))
     {
         db.Delete <Cliente>(x => x.ClienteId == id, "clientes");
     }
 }
 public void Delete(int id)
 {
     using (var db = new LiteDB.LiteRepository(new LiteDatabase(dirBanco)))
     {
         db.Delete <Servico>(x => x.ServicoId == id, "servicos");
     }
 }
Example #3
0
 public void Delete(int id)
 {
     using (var db = new LiteDB.LiteRepository(new LiteDatabase(dirBanco)))
     {
         db.Delete <Agenda>(x => x.AgendaId == id, "agendas");
     }
 }
 public async Task Delete <T>(Guid id) where T : IEntity
 {
     await Task.Run(() =>
     {
         using var db = new LiteDB.LiteRepository(_connectionString);
         db.Delete <T>(e => e.Id == id);
     });
 }