private ExclusaoInteresseDTO ObterDTO(string id) { var dto = new ExclusaoInteresseDTO(); dto.IdInteresse = ObjectId.Parse(id); dto.IdUsuario = ObterUsuarioDaSecao().Id; return(dto); }
public async Task ExcluirInteresse(ExclusaoInteresseDTO dto) { await Task.Run(() => { var query = Query.And(Query <UsuarioMOD> .EQ(_ => _.Id, dto.IdUsuario), Query.EQ("Interesses._id", dto.IdInteresse)); var update = Update.Pull("Interesses", Query.EQ("_id", dto.IdInteresse)); _conn.Conectar("mongodb://localhost", "napegada", "usuario").Update(query, update); }); }
public async Task ExcluirInteresse(ExclusaoInteresseDTO dto) { await _usuarioREP.ExcluirInteresse(dto); }