public override void Delete(LogDto dto) { using (UnitOfMongo op = new UnitOfMongo()) { NoSQLLogEntity entity = op.Query <NoSQLLogEntity>().Where(x => x.Id.Equals(dto.Id)).FirstOrDefault(); if (entity != null) { op.Delete(entity); } } }
public override void Delete(AppDto dto) { using (UnitOfMongo op = new UnitOfMongo()) { List <NoSQLLogEntity> entity = op.Query <NoSQLLogEntity>().Where(x => x.AppId.Equals(dto.Id)).ToList(); if (entity != null && entity.Count > 0) { foreach (NoSQLLogEntity log in entity) { op.Delete(log); } } } }