public static Cliente GetById(int id, bool onlyActives = true) { Cliente Cliente = null; try { var Query = ClienteQuerys.GetById(id, onlyActives); var Result = Commands.ExecuteQuery(Query); Cliente = GetData(Result).First(); } catch (Exception ex) { ExceptionUtility.LogError(ex); } return(Cliente); }
public static List <Cliente> GetList(bool onlyActives = true) { List <Cliente> ListCliente = new List <Cliente>(); try { var Query = ClienteQuerys.GetList(onlyActives); var Result = Commands.ExecuteQuery(Query); ListCliente = GetData(Result); } catch (Exception ex) { ExceptionUtility.LogError(ex); } return(ListCliente); }