Пример #1
0
        public override Person TranslateToModel(PERSON entity)
        {
            try
            {
                Person person = null;
                if (entity != null)
                {
                    person                = new Person();
                    person.Id             = entity.Person_Id;
                    person.FirstName      = entity.First_Name;
                    person.LastName       = entity.Last_Name;
                    person.Type           = personTypeTranslator.TranslateToModel(entity.PERSON_TYPE);
                    person.OtherName      = entity.Other_Name;
                    person.ContactAddress = entity.Contact_Address;
                    person.Email          = entity.Email;
                    person.MobilePhone    = entity.Mobile_Phone;
                    person.Lga            = lgaTranslator.TranslateToModel(entity.LGA);
                    person.State          = stateTranslator.TranslateToModel(entity.STATE);
                    person.Country        = countryTranslator.TranslateToModel(entity.COUNTRY);
                    person.DateEntered    = entity.Date_Entered;
                    person.IsBlacklisted  = entity.Is_Blacklisted;
                }

                return(person);
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #2
0
        public override Lga TranslateToModel(LGA entity)
        {
            try
            {
                Lga lga = null;
                if (entity != null)
                {
                    lga       = new Lga();
                    lga.Id    = entity.Lga_Id;
                    lga.Code  = entity.Lga_Code;
                    lga.Name  = entity.Lga_Name;
                    lga.State = _stateTranslator.TranslateToModel(entity.STATE);
                }

                return(lga);
            }
            catch (Exception)
            {
                throw;
            }
        }