コード例 #1
0
        private static Person ToPeople(PatientView view)
        {
            if (view == null)
            {
                throw new ArgumentNullException(nameof(view));
            }

            var m = new Person(); //el tipo que vamos a devolver

            view.Transfer(ref m);
            return(m);

            //return new Person
            //{
            //    PersonId = view.PersonId,
            //    AuthorId = view.AuthorId,
            //    Imagen = view.Imagen,
            //    StatusId = view.StatusId,
            //    Address = view.Address,
            //    ReligionId = view.ReligionId,
            //    OcupationId = view.OcupationId,
            //    MaritalSituationId = view.MaritalSituationId,
            //    Cel = view.Cel,
            //    Tel = view.Tel,
            //    Email = view.Email,
            //    CountryId = view.CountryId,
            //    GenderId = view.GenderId,
            //    BornDate = view.BornDate,
            //    LastName = view.LastName,
            //    Name = view.Name,
            //    Rnc = view.Rnc
            //};
        }
コード例 #2
0
        private static Patient ToPatient(PatientView view)
        {
            if (view == null)
            {
                throw new ArgumentNullException(nameof(view));
            }
            var m = new Patient(); //el tipo que vamos a devolver

            view.Transfer(ref m);
            return(m);
            //return new Patient()
            //{
            //    PersonId = view.PersonId,
            //    PatientId = view.PatientId,
            //    Record = view.Record,
            //    CreationDate = view.CreationDate,
            //    InsuranceId = view.InsuranceId,
            //    BloodTypeId = view.BloodTypeId,
            //    Age = view.Age

            //};
        }