public bool SavePhoto(LoginDTO dto) { try { var query = "UPDATE usuario SET foto=@IMG WHERE id = '" + dto.Id + "'"; bd.Conectar(); bd.ExecutarComandoSQLWithByteParameter(query, dto.Photo); return(true); } catch (Exception ex) { throw new Exception(ex.ToString()); } }