Beispiel #1
0
        public AUTOR S_dto_autor(AUTORDTO a)
        {
            var lista = new List <CARTE>();

            if (a.CARTE != null)
            {
                lista = a.CARTE.Select(x => S_dto_carte(x)).ToList();
            }

            return(new AUTOR()
            {
                AutorId = a.AutorId,
                Nume = a.Nume,
                Prenume = a.Prenume,
                CARTE = lista
            });
        }
Beispiel #2
0
        public AUTORDTO S_autor_dto(AUTOR a)
        {
            //var lista = new List<CARTEDTO>();
            if (a.CARTE != null)
            {
                //  lista = a.CARTE.Select(x => S_carte_dto(x)).ToList();
            }
            AUTORDTO a1 = new AUTORDTO()
            {
                AutorId = a.AutorId,
                Nume    = a.Nume,
                Prenume = a.Prenume
                          //    CARTE = lista
            };

            return(a1);
        }
Beispiel #3
0
 public void S_adauga_autor(AUTORDTO a)
 {
     ClassLibrary1.Program.adauga_autor(S_dto_autor(a));
 }