示例#1
0
        public virtual ApiMessageResponseModel MapBOToModel(
            BOMessage boMessage)
        {
            var model = new ApiMessageResponseModel();

            model.SetProperties(boMessage.MessageId, boMessage.Content, boMessage.SenderUserId);

            return(model);
        }
        public virtual BOMessage MapEFToBO(
            Message ef)
        {
            var bo = new BOMessage();

            bo.SetProperties(
                ef.MessageId,
                ef.Content,
                ef.SenderUserId);
            return(bo);
        }
        public virtual Message MapBOToEF(
            BOMessage bo)
        {
            Message efMessage = new Message();

            efMessage.SetProperties(
                bo.Content,
                bo.MessageId,
                bo.SenderUserId);
            return(efMessage);
        }
示例#4
0
        public virtual BOMessage MapModelToBO(
            int messageId,
            ApiMessageRequestModel model
            )
        {
            BOMessage boMessage = new BOMessage();

            boMessage.SetProperties(
                messageId,
                model.Content,
                model.SenderUserId);
            return(boMessage);
        }