Esempio n. 1
0
        public virtual ApiAdminResponseModel MapBOToModel(
            BOAdmin boAdmin)
        {
            var model = new ApiAdminResponseModel();

            model.SetProperties(boAdmin.Id, boAdmin.Email, boAdmin.FirstName, boAdmin.LastName, boAdmin.Password, boAdmin.Phone, boAdmin.Username);

            return(model);
        }
        public virtual BOAdmin MapEFToBO(
            Admin ef)
        {
            var bo = new BOAdmin();

            bo.SetProperties(
                ef.Id,
                ef.Email,
                ef.FirstName,
                ef.LastName,
                ef.Password,
                ef.Phone,
                ef.Username);
            return(bo);
        }
        public virtual Admin MapBOToEF(
            BOAdmin bo)
        {
            Admin efAdmin = new Admin();

            efAdmin.SetProperties(
                bo.Email,
                bo.FirstName,
                bo.Id,
                bo.LastName,
                bo.Password,
                bo.Phone,
                bo.Username);
            return(efAdmin);
        }
Esempio n. 4
0
        public virtual BOAdmin MapModelToBO(
            int id,
            ApiAdminRequestModel model
            )
        {
            BOAdmin boAdmin = new BOAdmin();

            boAdmin.SetProperties(
                id,
                model.Email,
                model.FirstName,
                model.LastName,
                model.Password,
                model.Phone,
                model.Username);
            return(boAdmin);
        }