Created
August 16, 2018 02:03
-
-
Save Pompeu/974e331c908482d6ff23d387bc47de6f to your computer and use it in GitHub Desktop.
select.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| tenta evitar for, foreach coiosas que mudão estados. | |
| var listDtoTipoAquecimento = new List<DtoTipoAquecimento>(); | |
| foreach (var item in tipoAquecimentos) | |
| { | |
| listDtoTipoAquecimento.Add( | |
| new DtoTipoAquecimento() | |
| { | |
| Id = item.Id, | |
| Nome = item.Nome, | |
| Potencia = item.Potencia, | |
| Tempo = item.Tempo | |
| }); | |
| } | |
| */ | |
| private IList<DtoTipoAquecimento> TransformarObjetoParaDto(IList<Dominio.TipoAquecimento> tipoAquecimentos) | |
| { | |
| return tipoAquecimentos | |
| .Select(tipo => new DtoTipoAquecimento { | |
| Id = tipo.Id, | |
| Nome = tipo.Nome, | |
| Potencia = tipo.Potencia, | |
| Tempo = tipo.Tempo | |
| }) | |
| .ToList(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment