public static School.Web.Models.UserClass ToWebModel(this School.Business.UserClass businessObject)
        {
            var targetClass = businessObject.Class.ToWebModel();
            var targetUser  = businessObject.User.ToWebModel();


            return(new School.Web.Models.UserClass()
            {
                ClassId = businessObject.ClassId,
                UserId = targetUser.UserId,
                Class = targetClass,
                User = targetUser
            });
        }
Beispiel #2
0
 public static School.Repository.UserClass ToRepositoryModel(this School.Business.UserClass repositoryObject)
 {
     return(mapper.Map <School.Repository.UserClass>(repositoryObject));
 }