コード例 #1
0
        //public static IDalEntity ToDal(this IBllEntity itemEntity)
        //{
        //    return null;
        //}

        public static DalUserEntity ToDal(this BllUserEntity itemUserEntity)
        {
            if (itemUserEntity == null)
                return null;

            DalUserEntity dalUserEntity = new DalUserEntity
            {
                Id = itemUserEntity.Id,
                Name = itemUserEntity.Name,
                Password = itemUserEntity.Password,
                DalRole = itemUserEntity.BllRole.ToDal()
            };
            return dalUserEntity;
        }
コード例 #2
0
        public static DalUserEntity ToDal(this User item)
        {
            if (item == null)
                return null;

            DalUserEntity userDalEntity = new DalUserEntity
            {
                Id = item.Id,
                Name = item.Name,
                Password = item.Password,
                DalRole = item.Role.ToDal()
            };
            return userDalEntity;
        }