public static StaticEnumBaseDTO ToBaseDTO(this StaticEnumDataBaseDTO enumType) { switch (enumType) { case StaticEnumDataBaseDTO.NotStatic: return(StaticEnumBaseDTO.NotStatic); case StaticEnumDataBaseDTO.Static: return(StaticEnumBaseDTO.Static); } throw new Exception(); }
public static Tuple <AccessLevelDataBaseDTO, AbstractEnumDataBaseDTO, StaticEnumDataBaseDTO, VirtualEnumDataBaseDTO> MapToDatabaseModel(this Tuple <AccessLevelBaseDTO, AbstractEnumBaseDTO, StaticEnumBaseDTO, VirtualEnumBaseDTO> tuple) { if (tuple == null) { return(null); } AccessLevelDataBaseDTO accessLevelBase = tuple.Item1.MapToDatabaseModel(); AbstractEnumDataBaseDTO abstractEnumBase = tuple.Item2.MapToDatabaseModel(); StaticEnumDataBaseDTO staticEnumBase = tuple.Item3.MapToDatabaseModel(); VirtualEnumDataBaseDTO virtualEnumBase = tuple.Item4.MapToDatabaseModel(); return(new Tuple <AccessLevelDataBaseDTO, AbstractEnumDataBaseDTO, StaticEnumDataBaseDTO, VirtualEnumDataBaseDTO>(accessLevelBase, abstractEnumBase, staticEnumBase, virtualEnumBase)); }