Example #1
0
        public static Tuple <AccessLevelDataBaseDTO, SealedEnumDataBaseDTO, AbstractEnumDataBaseDTO> MapToDatabaseModel(this Tuple <AccessLevelBaseDTO, SealedEnumBaseDTO, AbstractEnumBaseDTO> tuple)
        {
            if (tuple == null)
            {
                return(null);
            }
            AccessLevelDataBaseDTO  accessLevelBase  = tuple.Item1.MapToDatabaseModel();
            SealedEnumDataBaseDTO   sealedEnumBase   = tuple.Item2.MapToDatabaseModel();
            AbstractEnumDataBaseDTO abstractEnumBase = tuple.Item3.MapToDatabaseModel();

            return(new Tuple <AccessLevelDataBaseDTO, SealedEnumDataBaseDTO, AbstractEnumDataBaseDTO>(accessLevelBase, sealedEnumBase, abstractEnumBase));
        }
Example #2
0
        public static AccessLevelBaseDTO ToBaseDTO(this AccessLevelDataBaseDTO enumType)
        {
            switch (enumType)
            {
            case AccessLevelDataBaseDTO.IsPrivate:
                return(AccessLevelBaseDTO.IsPrivate);

            case AccessLevelDataBaseDTO.IsProtected:
                return(AccessLevelBaseDTO.IsProtected);

            case AccessLevelDataBaseDTO.IsProtectedInternal:
                return(AccessLevelBaseDTO.IsProtectedInternal);

            case AccessLevelDataBaseDTO.IsPublic:
                return(AccessLevelBaseDTO.IsPublic);
            }
            throw new Exception();
        }