コード例 #1
0
        ActoresServi CloonaListaActores(Actor un)
        {
            ActoresServi ret = new ActoresServi();

            ret.Codigo = un.Codigo;
            ret.Nombre = un.Nombre;
            return(ret);
        }
コード例 #2
0
        public List <ActoresServi> ListaTodosLosActores()
        {
            List <ActoresServi> ret = new List <ActoresServi>();
            //List<Actor> ListaActores = new List<Actor>();
            IEnumerable <Actor> ListaActores1 = new List <Actor>();
            RepositorioActor    repoActor     = new RepositorioActor();

            ListaActores1 = repoActor.FindAll();
            ActoresServi actoresServi = new ActoresServi();

            foreach (var unActor in ListaActores1)
            {
                //int a = unGenero.Id;
                //a = Clone(a);
                //unGeneroDeServi.Id =a;
                //unGeneroDeServi.Nombre = unGenero.Nombre;
                actoresServi = CloonaListaActores(unActor);
                ret.Add(actoresServi);
            }
            return(ret);
            //throw new NotImplementedException();
        }