Esempio n. 1
0
        public virtual ApiUsersResponseModel MapBOToModel(
            BOUsers boUsers)
        {
            var model = new ApiUsersResponseModel();

            model.SetProperties(boUsers.Id, boUsers.AboutMe, boUsers.AccountId, boUsers.Age, boUsers.CreationDate, boUsers.DisplayName, boUsers.DownVotes, boUsers.EmailHash, boUsers.LastAccessDate, boUsers.Location, boUsers.Reputation, boUsers.UpVotes, boUsers.Views, boUsers.WebsiteUrl);

            return(model);
        }
        public virtual BOUsers MapEFToBO(
            Users ef)
        {
            var bo = new BOUsers();

            bo.SetProperties(
                ef.Id,
                ef.AboutMe,
                ef.AccountId,
                ef.Age,
                ef.CreationDate,
                ef.DisplayName,
                ef.DownVotes,
                ef.EmailHash,
                ef.LastAccessDate,
                ef.Location,
                ef.Reputation,
                ef.UpVotes,
                ef.Views,
                ef.WebsiteUrl);
            return(bo);
        }
        public virtual Users MapBOToEF(
            BOUsers bo)
        {
            Users efUsers = new Users();

            efUsers.SetProperties(
                bo.AboutMe,
                bo.AccountId,
                bo.Age,
                bo.CreationDate,
                bo.DisplayName,
                bo.DownVotes,
                bo.EmailHash,
                bo.Id,
                bo.LastAccessDate,
                bo.Location,
                bo.Reputation,
                bo.UpVotes,
                bo.Views,
                bo.WebsiteUrl);
            return(efUsers);
        }
Esempio n. 4
0
        public virtual BOUsers MapModelToBO(
            int id,
            ApiUsersRequestModel model
            )
        {
            BOUsers boUsers = new BOUsers();

            boUsers.SetProperties(
                id,
                model.AboutMe,
                model.AccountId,
                model.Age,
                model.CreationDate,
                model.DisplayName,
                model.DownVotes,
                model.EmailHash,
                model.LastAccessDate,
                model.Location,
                model.Reputation,
                model.UpVotes,
                model.Views,
                model.WebsiteUrl);
            return(boUsers);
        }