public static GuardarropaEntity MapEntity(Guardarropa guardarropa) { ICollection <PrendaEntity> prendas = new List <PrendaEntity>(); foreach (var x in guardarropa.Prendas) { prendas.Add(PrendaMapper.MapEntity(x)); } return(new GuardarropaEntity() { GuardarropaId = guardarropa.GuardarropaId, PrendasMaximas = guardarropa.PrendasMaximas, Usuarios = guardarropa.Usuarios, Prendas = prendas }); }
public static SugerenciaEntity MapEntity(Sugerencia sugerencia) { ICollection <PrendaEntity> prendas = new List <PrendaEntity>(); foreach (var x in sugerencia.Atuendo.Prendas) { prendas.Add(PrendaMapper.MapEntity(x)); } return(new SugerenciaEntity() { UsuarioId = sugerencia.UsuarioId, SugerenciaId = sugerencia.SugerenciaId, CalorTotal = sugerencia.CalorTotal, Aceptada = sugerencia.Aceptada, Atuendo = prendas }); }