public static List<ClienteDto> ObterClientes() { using (DBModel db = new DBModel()) { return ClienteDto.ConverterLista(db.Cliente.ToList<Cliente>()); } }
public static List <ClienteDto> ObterClientes() { using (DBModel db = new DBModel()) { var result = db.Cliente.SqlQuery("Select * From Cliente").ToList <Cliente>();; return(ClienteDto.ConverterLista(result)); } }