Exemple #1
0
        public virtual ApiVotesResponseModel MapBOToModel(
            BOVotes boVotes)
        {
            var model = new ApiVotesResponseModel();

            model.SetProperties(boVotes.Id, boVotes.BountyAmount, boVotes.CreationDate, boVotes.PostId, boVotes.UserId, boVotes.VoteTypeId);

            return(model);
        }
Exemple #2
0
        public virtual BOVotes MapEFToBO(
            Votes ef)
        {
            var bo = new BOVotes();

            bo.SetProperties(
                ef.Id,
                ef.BountyAmount,
                ef.CreationDate,
                ef.PostId,
                ef.UserId,
                ef.VoteTypeId);
            return(bo);
        }
Exemple #3
0
        public virtual Votes MapBOToEF(
            BOVotes bo)
        {
            Votes efVotes = new Votes();

            efVotes.SetProperties(
                bo.BountyAmount,
                bo.CreationDate,
                bo.Id,
                bo.PostId,
                bo.UserId,
                bo.VoteTypeId);
            return(efVotes);
        }
Exemple #4
0
        public virtual BOVotes MapModelToBO(
            int id,
            ApiVotesRequestModel model
            )
        {
            BOVotes boVotes = new BOVotes();

            boVotes.SetProperties(
                id,
                model.BountyAmount,
                model.CreationDate,
                model.PostId,
                model.UserId,
                model.VoteTypeId);
            return(boVotes);
        }