// add to configuration.cs UbnIncorrectCallSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.UbnIncorrectCall.AddOrUpdate( p => p.QsoNo, new UbnIncorrectCall { QsoNo = 1, LogId = 2, CorrectCall = "CN4P" } ); }
// add to configuration.cs UbnDupeSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.UbnDupes.AddOrUpdate( p => p.QsoNo, new UbnDupes { QsoNo = 2, LogId = 2 } ); }
// add to configuration.cs LogSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.Log.AddOrUpdate( p => p.LogId, new Log { LogId = 1, CallsignId = 1, ContestId = "CQWWSSB2002", ContestYear = DateTime.Parse("10/26/2002 00:00:00"), LogCategoryId = 2, QsoExchangeNumber = 33, QsoDatabaseServerInstance =@"PSS60\SQL2014",QsoDatabaseInstance = "ContestqsoData", QsoDatabaseTableName = "Qso"}, new Log { LogId = 2, CallsignId = 2 , ContestId = "CQWWSSB2002", ContestYear = DateTime.Parse("10/26/2002 00:00:00"), LogCategoryId = 2, QsoExchangeNumber = 33, QsoDatabaseServerInstance =@"PSS60\SQL2014", QsoDatabaseInstance = "ContestqsoData",QsoDatabaseTableName = "Qso"}, new Log { LogId = 3, CallsignId = 3, ContestId = "CQWWSSB2002", ContestYear = DateTime.Parse("10/26/2002 00:00:00"), LogCategoryId = 1, QsoExchangeNumber = 33, QsoDatabaseServerInstance =@"PSS60\SQL2014", QsoDatabaseInstance = "ContestqsoData", QsoDatabaseTableName = "Qso"}, new Log { LogId = 4, CallsignId = 4, ContestId = "CQWWSSB2002", ContestYear = DateTime.Parse("10/26/2002 00:00:00"), LogCategoryId = 5, QsoExchangeNumber = 14, QsoDatabaseServerInstance =@"PSS60\SQL2014", QsoDatabaseInstance = "ContestqsoData", QsoDatabaseTableName = "Qso"}, //WPX new Log { LogId = 5, CallsignId = 1, ContestId = "CQWPXSSB2002", ContestYear = DateTime.Parse("03/30/2002 00:00:00"), LogCategoryId = 2, QsoExchangeNumber = 33, QsoDatabaseServerInstance =@"PSS60\SQL2014",QsoDatabaseInstance = "ContestqsoData", QsoDatabaseTableName = "Qso"}, new Log { LogId = 6, CallsignId = 2 , ContestId = "CQWPXSSB2002", ContestYear = DateTime.Parse("03/30/2002 00:00:00"), LogCategoryId = 2, QsoExchangeNumber = 33, QsoDatabaseServerInstance =@"PSS60\SQL2014", QsoDatabaseInstance = "ContestqsoData",QsoDatabaseTableName = "Qso"}, new Log { LogId = 7, CallsignId = 3, ContestId = "CQWPXSSB2002", ContestYear = DateTime.Parse("03/30/2002 00:00:00"), LogCategoryId = 1, QsoExchangeNumber = 33, QsoDatabaseServerInstance =@"PSS60\SQL2014", QsoDatabaseInstance = "ContestqsoData", QsoDatabaseTableName = "Qso"}, new Log { LogId = 8, CallsignId = 4, ContestId = "CQWPXSSB2002", ContestYear = DateTime.Parse("03/30/2002 00:00:00"), LogCategoryId = 5, QsoExchangeNumber = 14, QsoDatabaseServerInstance =@"PSS60\SQL2014", QsoDatabaseInstance = "ContestqsoData", QsoDatabaseTableName = "Qso"} ); }
// add to configuration.cs UbnIncorrectExchangeSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.UbnIncorrectExchange.AddOrUpdate( p => p.QsoNo, new UbnIncorrectExchange { QsoNo = 1, LogId = 3, CorrectExchange= "33" } ); }
// add to configuration.cs UbnNotInLogSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.UbnNotInLog.AddOrUpdate( p => p.QsoNo, new UbnNotInLog { QsoNo = 2, LogId = 1 }, new UbnNotInLog { QsoNo = 1, LogId = 2 }, new UbnNotInLog { QsoNo = 1, LogId = 3 } ); }
// add to configuration.cs public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.CabrilloInfo.AddOrUpdate( p => p.CallSignId, new CabrilloInfo { CallSignId = 1, ContestId = "CQWWSSB2002", ClaimedScore = 15000060, Club = "EA Contest Clib", Operators = "EA9LZ, W7EJ, M0DRX" }, new CabrilloInfo { CallSignId = 2, ContestId = "CQWWSSB2002", ClaimedScore = 10000060, Club = "ITALY Clib", Operators = "IK2QEI" }, new CabrilloInfo { CallSignId = 3, ContestId = "CQWWSSB2002", ClaimedScore = 10000060, Club = "MOSCOW Clib", Operators = "RL3FT" } ); }
// add to configuration.cs QsoExchangeTypeSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.QsoExchangeType.AddOrUpdate( p => p.QsoExchangeTypeEnum, new QsoExchangeType { QsoExchangeTypeEnum = QsoExchangeTypeEnum.QsoExchangeAlpha, QsoExchangeTypeEnumName = Enum.GetName(typeof(QsoExchangeTypeEnum), QsoExchangeTypeEnum.QsoExchangeAlpha) }, new QsoExchangeType { QsoExchangeTypeEnum = QsoExchangeTypeEnum.QsoExchangeNumber, QsoExchangeTypeEnumName = Enum.GetName(typeof(QsoExchangeTypeEnum), QsoExchangeTypeEnum.QsoExchangeNumber) }, new QsoExchangeType { QsoExchangeTypeEnum = QsoExchangeTypeEnum.QsoExchangeMixed, QsoExchangeTypeEnumName = Enum.GetName(typeof(QsoExchangeTypeEnum), QsoExchangeTypeEnum.QsoExchangeMixed) } ); }
public static void SeedDefault(Logqso.mvc.DataModel.LogControl.LogControlDB context) { //called by // CategorySeeds.SeedCategory( context) in LoalControlDB.cs context.CatDefault.AddOrUpdate( p => p.CatOperator, new CatDefault { UserName = "******", CatOperatorEnum = CatOperatorEnum.ALL, CatAssistedEnum = CatAssistedEnum.ALL, CatBandEnum = CatBandEnum.ALL, CatNoOfTxEnum = CatNoOfTxEnum.ALL, CatPowerEnum = CatPowerEnum.ALL } ); context.FiltDefaullt.AddOrUpdate( p => p.FiltBnd, new FiltDefaullt { UserName = "******", FiltBnd = CatBandEnum.ALL, FiltCont = ContinentEnum.ALL, FiltPref = "-", FiltCQZoneVal = "ALL" } ); context.XaxisDefault.AddOrUpdate( p => p.XaxisDuration, new XaxisDefault { UserName = "******", XaxisDurationTime = "48", XaxisStrtTime = "00:00z Day1", } ); context.YaxisDefault.AddOrUpdate( p => p.YaxisFuncName, new YaxisDefault { UserName = "******", YaxisFuncName = "QSO Rate", YaxisIntvVal = "60", YaxisViewTypeName = "Column", } ); }
// add to configuration.cs CallSignSeeds.SeedContest(context); /* QsoModeTypeSeeds.SeedContest(context); QsoExchangeTypeSeeds.SeedContest(context); QsoRadioTypeSeeds.SeedContest(context); ContestTypeSeeds.SeedContest(context); CallSignSeeds.SeedContest(context); ContestSeeds.SeedContest(context); LogCategorySeeds.SeedContest(context); LogSeeds.SeedContest(context); StationSeeds.SeedContest(context); #if DEBUG QsoSeeds.SeedContest(context); #endif */ public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.CallSign.AddOrUpdate( p => p.Call, new CallSign { CallSignId = 1, Call = "CN2R", Prefix = "CN", ContinentEnum = ContinentEnum.AF }, new CallSign { CallSignId = 2, Call = "CN3A", Prefix = "CN", ContinentEnum = ContinentEnum.AF }, new CallSign { CallSignId = 3, Call = "CN2AA", Prefix = "CN", ContinentEnum = ContinentEnum.AF }, new CallSign { CallSignId = 4, Call = "DL1AA", Prefix = "DL", ContinentEnum = ContinentEnum.EU } ); }
public static void SeedYaxis(Logqso.mvc.DataModel.LogControl.LogControlDB context) { //called by // YaxisSeeds.SeedYaxis( context) in LoalControlDB.cs context.YaxisFunction.AddOrUpdate( p => p.YaxisFuncName, new YaxisFunction { YaxisFuncName = "QSO Rate", Index = 1 }, new YaxisFunction { YaxisFuncName = "QSO Sum", Index = 2 }, new YaxisFunction { YaxisFuncName = "Score Rate", Index = 3 }, new YaxisFunction { YaxisFuncName = "Score Sum", Index = 4 }, new YaxisFunction { YaxisFuncName = "Zone Rate", Index = 5 }, new YaxisFunction { YaxisFuncName = "Zone Sum", Index = 6 }, new YaxisFunction { YaxisFuncName = "Country Rate", Index = 7 }, new YaxisFunction { YaxisFuncName = "Country Sum", Index = 8 }, new YaxisFunction { YaxisFuncName = "Point Rate", Index = 9 }, new YaxisFunction { YaxisFuncName = "Point Sum", Index = 10 }, new YaxisFunction { YaxisFuncName = "Mult Rate", Index = 11 }, new YaxisFunction { YaxisFuncName = "Mult Sum", Index = 12 }, new YaxisFunction { YaxisFuncName = "Prefix Rate", Index = 13 }, new YaxisFunction { YaxisFuncName = "Prefix Sum", Index = 14 } ); context.YaxisInterval.AddOrUpdate( p => p.YaxisIntvVal, new YaxisInterval { YaxisIntvVal = "60", Index = 1 }, new YaxisInterval { YaxisIntvVal = "30", Index = 2 }, new YaxisInterval { YaxisIntvVal = "15", Index = 3 }, new YaxisInterval { YaxisIntvVal = "10", Index = 4 }, new YaxisInterval { YaxisIntvVal = "5", Index = 5 }, new YaxisInterval { YaxisIntvVal = "1", Index = 6 } ); context.YaxisViewType.AddOrUpdate( p => p.YaxisViewTypeName, new YaxisViewType { YaxisViewTypeName = "Column", Index = 1 }, new YaxisViewType { YaxisViewTypeName = "Column 3D", Index = 2 }, new YaxisViewType { YaxisViewTypeName = "Line", Index = 3 }, new YaxisViewType { YaxisViewTypeName = "Spline", Index = 4 }, new YaxisViewType { YaxisViewTypeName = "Area", Index = 5 }, new YaxisViewType { YaxisViewTypeName = "Area 3D", Index = 6 }, new YaxisViewType { YaxisViewTypeName = "Point", Index = 7 }, new YaxisViewType { YaxisViewTypeName = "StackedColumn", Index = 8 } ); }
public static void SeedQsoExchangeNumber(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.QsoExchangeNumber.AddOrUpdate( p => p.QsoNo, new QsoExchangeNumber { LogId = 5, QsoNo = 1, QsoExhangeNumberValue = 1,}, new QsoExchangeNumber { LogId = 5, QsoNo = 2, QsoExhangeNumberValue = 2,}, new QsoExchangeNumber { LogId = 6, QsoNo = 1, QsoExhangeNumberValue = 1,}, new QsoExchangeNumber { LogId = 6, QsoNo = 2, QsoExhangeNumberValue = 1,}, new QsoExchangeNumber { LogId = 6, QsoNo = 3, QsoExhangeNumberValue = 2,}, new QsoExchangeNumber { LogId = 7, QsoNo = 1, QsoExhangeNumberValue = 1,} ); }
public static void SeedXaxis(Logqso.mvc.DataModel.LogControl.LogControlDB context) { //called by // XAxisSeeds.SeedXaxis( context) in LoalControlDB.cs context.XaxisStartTime.AddOrUpdate( p => p.XaxisStrtTime, new XaxisStartTime { XaxisStrtTime = "00:00z Day1", Index = 1 }, new XaxisStartTime { XaxisStrtTime = "02:00z Day1", Index = 2 }, new XaxisStartTime { XaxisStrtTime = "04:00z Day1", Index = 3 }, new XaxisStartTime { XaxisStrtTime = "06:00z Day1", Index = 4 }, new XaxisStartTime { XaxisStrtTime = "08:00z Day1", Index = 5 }, new XaxisStartTime { XaxisStrtTime = "10:00z Day1", Index = 6 }, new XaxisStartTime { XaxisStrtTime = "12:00z Day1", Index = 7 }, new XaxisStartTime { XaxisStrtTime = "14:00z Day1", Index = 8 }, new XaxisStartTime { XaxisStrtTime = "16:00z Day1", Index = 9 }, new XaxisStartTime { XaxisStrtTime = "18:00z Day1", Index = 10 }, new XaxisStartTime { XaxisStrtTime = "20:00z Day1", Index = 11 }, new XaxisStartTime { XaxisStrtTime = "22:00z Day1", Index = 12 }, new XaxisStartTime { XaxisStrtTime = "00:00z Day2", Index = 13 }, new XaxisStartTime { XaxisStrtTime = "02:00z Day2", Index = 14 }, new XaxisStartTime { XaxisStrtTime = "04:00z Day2", Index = 15 }, new XaxisStartTime { XaxisStrtTime = "06:00z Day2", Index = 16 }, new XaxisStartTime { XaxisStrtTime = "08:00z Day2", Index = 17 }, new XaxisStartTime { XaxisStrtTime = "10:00z Day2", Index = 18 }, new XaxisStartTime { XaxisStrtTime = "12:00z Day2", Index = 19 }, new XaxisStartTime { XaxisStrtTime = "14:00z Day2", Index = 20 }, new XaxisStartTime { XaxisStrtTime = "16:00z Day2", Index = 21 }, new XaxisStartTime { XaxisStrtTime = "18:00z Day2", Index = 22 }, new XaxisStartTime { XaxisStrtTime = "20:00z Day2", Index = 23 }, new XaxisStartTime { XaxisStrtTime = "22:00z Day2", Index = 24 } ); context.XaxisDuration.AddOrUpdate( p => p.XaxisDurationTime, new XaxisDuration { XaxisDurationTime = "48", Index = 1 }, new XaxisDuration { XaxisDurationTime = "1", Index = 2 }, new XaxisDuration { XaxisDurationTime = "2", Index = 3 }, new XaxisDuration { XaxisDurationTime = "4", Index = 4 }, new XaxisDuration { XaxisDurationTime = "8", Index = 5 }, new XaxisDuration { XaxisDurationTime = "12", Index = 6 }, new XaxisDuration { XaxisDurationTime = "16", Index = 7 }, new XaxisDuration { XaxisDurationTime = "20", Index = 8 }, new XaxisDuration { XaxisDurationTime = "24", Index = 9 } ); }
// add to configuration.cs CallInfoSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.CallInfo.AddOrUpdate( p => p.CallInfoId, new CallInfo { CallInfoId = 0, CallGroup = CallGroupEnum.CALL1, CallsignId = 1, ContestId = "CQWWSSB2002", LogId = 1, SessionName = "default_cn2r_cn3a_cn2aa", QsoRadioTypeEnum= common.Enum.QsoRadioTypeEnum.R1, StationName = "STN1",UserName = "******", Disabled = false}, new CallInfo { CallInfoId = 0, CallGroup = CallGroupEnum.CALL2, CallsignId = 2, ContestId = "CQWWSSB2002", LogId = 2, SessionName = "default_cn2r_cn3a_cn2aa", QsoRadioTypeEnum= common.Enum.QsoRadioTypeEnum.R2,StationName = "STN2",UserName = "******", Disabled = false}, new CallInfo { CallInfoId = 0, CallGroup = CallGroupEnum.CALL3, CallsignId = 3, ContestId = "CQWWSSB2002", LogId = 3, SessionName = "default_cn2r_cn3a_cn2aa", QsoRadioTypeEnum= common.Enum.QsoRadioTypeEnum.Run,UserName = "******", Disabled = false} ); }
// add to configuration.cs QsoRadioTypeSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.QsoRadioType.AddOrUpdate( p => p.QsoRadioTypeEnum, new QsoRadioType { QsoRadioTypeEnum = QsoRadioTypeEnum.ALL, QsoRadioTypeName = Enum.GetName(typeof(QsoRadioTypeEnum), QsoRadioTypeEnum.ALL) }, new QsoRadioType { QsoRadioTypeEnum = QsoRadioTypeEnum.R1, QsoRadioTypeName = Enum.GetName(typeof(QsoRadioTypeEnum), QsoRadioTypeEnum.R1) }, new QsoRadioType { QsoRadioTypeEnum = QsoRadioTypeEnum.R2, QsoRadioTypeName = Enum.GetName(typeof(QsoRadioTypeEnum), QsoRadioTypeEnum.R2) }, new QsoRadioType { QsoRadioTypeEnum = QsoRadioTypeEnum.Run, QsoRadioTypeName = Enum.GetName(typeof(QsoRadioTypeEnum), QsoRadioTypeEnum.Run) }, new QsoRadioType { QsoRadioTypeEnum = QsoRadioTypeEnum.Mult, QsoRadioTypeName = Enum.GetName(typeof(QsoRadioTypeEnum), QsoRadioTypeEnum.Mult) }, new QsoRadioType { QsoRadioTypeEnum = QsoRadioTypeEnum.S_P, QsoRadioTypeName = Enum.GetName(typeof(QsoRadioTypeEnum), QsoRadioTypeEnum.S_P) }, new QsoRadioType { QsoRadioTypeEnum = QsoRadioTypeEnum.NONE, QsoRadioTypeName = Enum.GetName(typeof(QsoRadioTypeEnum), QsoRadioTypeEnum.NONE) } ); }
// add to configuration.cs ContestTypeSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.ContestType.AddOrUpdate( p => p.ContestTypeEnumName, new ContestType { ContestTypeEnum = ContestTypeEnum.CQWW , ContestTypeEnumName = Enum.GetName(typeof(ContestTypeEnum), ContestTypeEnum.CQWW), QsoExchangeName = "Zone", QsoExchangeTypeEnum = QsoExchangeTypeEnum.QsoExchangeNumber, QsoMultName = "ZnMlt", QsoMult2Name = "CtyMlt"}, new ContestType { ContestTypeEnum = ContestTypeEnum.CQWPX , ContestTypeEnumName = Enum.GetName(typeof(ContestTypeEnum), ContestTypeEnum.CQWPX), QsoExchangeName = "Rx #", QsoExchangeTypeEnum = QsoExchangeTypeEnum.QsoExchangeNumber, QsoMultName = "PfxMlt", QsoMult2Name = "", ExtraDataName = "Prefix"}, new ContestType { ContestTypeEnum = ContestTypeEnum.CQ160 , ContestTypeEnumName = Enum.GetName(typeof(ContestTypeEnum), ContestTypeEnum.CQ160), QsoExchangeName = "Cty/St/Pv", QsoExchangeTypeEnum = QsoExchangeTypeEnum.QsoExchangeAlpha, QsoMultName = "Cty/St/Pv-Mlt", QsoMult2Name = ""}, new ContestType { ContestTypeEnum = ContestTypeEnum.RUSDXC , ContestTypeEnumName = Enum.GetName(typeof(ContestTypeEnum), ContestTypeEnum.RUSDXC), QsoExchangeName = "Obl/#", QsoExchangeTypeEnum = QsoExchangeTypeEnum.QsoExchangeMixed, QsoMultName = "OblMlt", QsoMult2Name = "CtyMlt"} ); }
// add to configuration.cs LogCategorySeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.LogCategory.AddOrUpdate( p => p.LogCategoryId, new LogCategory { LogCategoryId = 1, CatAssistedEnum = CatAssistedEnum.ASSISTED, CatOperatorEnum = CatOperatorEnum.MULTI_OP, CatBandEnum = CatBandEnum.ALL, CatPowerEnum = CatPowerEnum.HIGH, CatNoOfTxEnum = CatNoOfTxEnum.UNLIMITED, CatOperatorOverlayEnum = CatOperatorOverlayEnum.NONE }, new LogCategory { LogCategoryId = 2, CatAssistedEnum = CatAssistedEnum.ASSISTED, CatOperatorEnum = CatOperatorEnum.MULTI_OP, CatBandEnum = CatBandEnum.ALL, CatPowerEnum = CatPowerEnum.HIGH, CatNoOfTxEnum = CatNoOfTxEnum.TWO, CatOperatorOverlayEnum = CatOperatorOverlayEnum.NONE }, new LogCategory { LogCategoryId = 3, CatAssistedEnum = CatAssistedEnum.ASSISTED, CatOperatorEnum = CatOperatorEnum.MULTI_OP, CatBandEnum = CatBandEnum.ALL, CatPowerEnum= CatPowerEnum.HIGH, CatNoOfTxEnum = CatNoOfTxEnum.ONE, CatOperatorOverlayEnum = CatOperatorOverlayEnum.NONE }, new LogCategory {LogCategoryId = 4, CatAssistedEnum = CatAssistedEnum.ASSISTED, CatOperatorEnum = CatOperatorEnum.MULTI_OP, CatBandEnum = CatBandEnum.ALL, CatPowerEnum= CatPowerEnum.LOW, CatNoOfTxEnum = CatNoOfTxEnum.ONE, CatOperatorOverlayEnum = CatOperatorOverlayEnum.NONE }, new LogCategory { LogCategoryId = 5, CatAssistedEnum = CatAssistedEnum.NON_ASSISTED, CatOperatorEnum = CatOperatorEnum.SINGLE_OP, CatBandEnum = CatBandEnum.ALL, CatPowerEnum = CatPowerEnum.HIGH, CatNoOfTxEnum = CatNoOfTxEnum.ONE, CatOperatorOverlayEnum = CatOperatorOverlayEnum.NONE }, new LogCategory { LogCategoryId = 6, CatAssistedEnum = CatAssistedEnum.NON_ASSISTED, CatOperatorEnum = CatOperatorEnum.SINGLE_OP, CatBandEnum = CatBandEnum.ALL, CatPowerEnum= CatPowerEnum.LOW, CatNoOfTxEnum = CatNoOfTxEnum.ONE, CatOperatorOverlayEnum = CatOperatorOverlayEnum.NONE }, new LogCategory { LogCategoryId = 7, CatAssistedEnum = CatAssistedEnum.NON_ASSISTED, CatOperatorEnum = CatOperatorEnum.SINGLE_OP, CatBandEnum = CatBandEnum.ALL, CatPowerEnum= CatPowerEnum.QRP, CatNoOfTxEnum = CatNoOfTxEnum.ONE, CatOperatorOverlayEnum = CatOperatorOverlayEnum.NONE }, new LogCategory { LogCategoryId = 8, CatAssistedEnum = CatAssistedEnum.ASSISTED, CatOperatorEnum = CatOperatorEnum.SINGLE_OP, CatBandEnum = CatBandEnum.ALL, CatPowerEnum= CatPowerEnum.HIGH, CatNoOfTxEnum = CatNoOfTxEnum.ONE, CatOperatorOverlayEnum = CatOperatorOverlayEnum.NONE }, new LogCategory { LogCategoryId = 9, CatAssistedEnum = CatAssistedEnum.ASSISTED, CatOperatorEnum = CatOperatorEnum.SINGLE_OP, CatBandEnum = CatBandEnum.ALL, CatPowerEnum= CatPowerEnum.LOW, CatNoOfTxEnum = CatNoOfTxEnum.ONE, CatOperatorOverlayEnum = CatOperatorOverlayEnum.NONE }, new LogCategory { LogCategoryId = 10, CatAssistedEnum = CatAssistedEnum.ASSISTED, CatOperatorEnum = CatOperatorEnum.SINGLE_OP, CatBandEnum = CatBandEnum.ALL, CatPowerEnum= CatPowerEnum.QRP, CatNoOfTxEnum = CatNoOfTxEnum.ONE, CatOperatorOverlayEnum = CatOperatorOverlayEnum.NONE } ); }
// add to configuration.cs StationSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.Station.AddOrUpdate( p => p.StationName, new Station { LogId = 1, StationName = "STN1" }, new Station { LogId = 1, StationName = "STN2" }, new Station { LogId = 1, StationName = "STN3" }, new Station { LogId = 1, StationName = "STN4" }, new Station { LogId = 2, StationName = "STN1" }, new Station { LogId = 2, StationName = "STN2" }, //WPX new Station { LogId = 5, StationName = "STN1" }, new Station { LogId = 5, StationName = "STN2" }, new Station { LogId = 5, StationName = "STN3" }, new Station { LogId = 5, StationName = "STN4" }, new Station { LogId = 6, StationName = "STN1" }, new Station { LogId = 6, StationName = "STN2" } ); }
// add to configuration.cs QsoSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.Qso.AddOrUpdate( p => p.QsoNo, new Qso { QsoNo = 1, LogId = 1, Frequency= 14208M, CallsignId = 2, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, StationName = "STN1", QsoDateTime = DateTime.Parse("10/26/2002 00:00:01"), QsoRadioTypeEnum = QsoRadioTypeEnum.R1, QsoExchangeNumber = 33, QZoneMult = true, QCtyMult = true, QPrefixMult = true, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false}, new Qso { QsoNo = 2, LogId = 1, Frequency= 14278M, CallsignId = 3, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, StationName = "STN2", QsoDateTime = DateTime.Parse("10/26/2002 00:00:01"), QsoRadioTypeEnum = QsoRadioTypeEnum.R1, QsoExchangeNumber = 33, QZoneMult = false, QCtyMult = false, QPrefixMult = false, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false}, new Qso { QsoNo = 1, LogId = 2, Frequency = 21290.7M, CallsignId = 1, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, StationName = "STN2", QsoDateTime = DateTime.Parse("10/26/2002 00:00:02"), QsoRadioTypeEnum = QsoRadioTypeEnum.R2, QsoExchangeNumber = 33, QZoneMult = true, QCtyMult = true, QPrefixMult = true, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false} , new Qso { QsoNo = 2, LogId = 2, Frequency = 21290.7M, CallsignId = 3, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, StationName = "STN2", QsoDateTime = DateTime.Parse("10/26/2002 00:00:02"), QsoRadioTypeEnum = QsoRadioTypeEnum.R2, QsoExchangeNumber = 33, QZoneMult = false, QCtyMult = false, QPrefixMult = false, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false}, new Qso { QsoNo = 3, LogId = 2, Frequency = 14290.7M, CallsignId = 1, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, StationName = "STN1", QsoDateTime = DateTime.Parse("10/26/2002 00:00:02"), QsoRadioTypeEnum = QsoRadioTypeEnum.R1, QsoExchangeNumber = 33, QZoneMult = false, QCtyMult = false, QPrefixMult = false, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false}, new Qso { QsoNo = 1, LogId = 3, Frequency = 14190.7M, CallsignId = 1, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, QsoDateTime = DateTime.Parse("10/26/2002 00:00:02"), QsoRadioTypeEnum = QsoRadioTypeEnum.Run, QsoExchangeNumber = 33, QZoneMult = true, QCtyMult = true, QPrefixMult = true, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false}, new Qso { QsoNo = 1, LogId = 4, Frequency = 14190.7M, CallsignId = 1, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, QsoDateTime = DateTime.Parse("10/26/2002 00:00:02"), QsoRadioTypeEnum = QsoRadioTypeEnum.Run, QsoExchangeNumber = 33, QZoneMult = true, QCtyMult = true, QPrefixMult = true, QPts1 = true, QPts2 = true, QPts4 = false, QPts8 = false}, //WPX // cn2r cn3a cn2aa // 14-cn3a-1 14-cn2r-1 // 14-cn2aa-1 14-cn2r-2 // 21=cn3a-1 21-cn2r-1 // new Qso { QsoNo = 1, LogId = 5, Frequency= 14208M, CallsignId = 2, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, StationName = "STN1", QsoDateTime = DateTime.Parse("03/30/2002 00:00:01"), QsoRadioTypeEnum = QsoRadioTypeEnum.R1, QsoExchangeNumber = 1, QZoneMult = true, QCtyMult = true, QPrefixMult = true, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false}, new Qso { QsoNo = 2, LogId = 5, Frequency= 14278M, CallsignId = 3, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, StationName = "STN2", QsoDateTime = DateTime.Parse("03/30/2002 00:00:02"), QsoRadioTypeEnum = QsoRadioTypeEnum.R1, QsoExchangeNumber = 2, QZoneMult = false, QCtyMult = false, QPrefixMult = false, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false}, new Qso { QsoNo = 1, LogId = 6, Frequency = 14208M, CallsignId = 1, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, StationName = "STN2", QsoDateTime = DateTime.Parse("03/30/2002 00:00:01"), QsoRadioTypeEnum = QsoRadioTypeEnum.R2, QsoExchangeNumber = 1, QZoneMult = true, QCtyMult = true, QPrefixMult = true, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false} , new Qso { QsoNo = 2, LogId = 6, Frequency = 21290.7M, CallsignId = 3, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, StationName = "STN1", QsoDateTime = DateTime.Parse("03/30/2002 00:00:02"), QsoRadioTypeEnum = QsoRadioTypeEnum.R1, QsoExchangeNumber = 2, QZoneMult = false, QCtyMult = false, QPrefixMult = false, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false}, new Qso { QsoNo = 3, LogId = 6, Frequency = 14290.7M, CallsignId = 1, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, StationName = "STN2", QsoDateTime = DateTime.Parse("03/30/2002 00:00:01"), QsoRadioTypeEnum = QsoRadioTypeEnum.R2, QsoExchangeNumber = 2, QZoneMult = false, QCtyMult = false, QPrefixMult = false, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false}, new Qso { QsoNo = 1, LogId = 7, Frequency = 14278.2M, CallsignId = 1, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, QsoDateTime = DateTime.Parse("03/30/2002 00:00:02"), QsoRadioTypeEnum = QsoRadioTypeEnum.Run, QsoExchangeNumber = 2, QZoneMult = true, QCtyMult = true, QPrefixMult = true, QPts1 = false, QPts2 = false, QPts4 = false, QPts8 = false}, new Qso { QsoNo = 1, LogId = 8, Frequency = 14190.7M, CallsignId = 1, QsoModeTypeEnum = common.Enum.QsoModeTypeEnum.SSB, RxRst = 59, TxRst = 59, QsoDateTime = DateTime.Parse("03/30/2002 00:00:02"), QsoRadioTypeEnum = QsoRadioTypeEnum.Run, QsoExchangeNumber = 01, QZoneMult = true, QCtyMult = true, QPrefixMult = true, QPts1 = true, QPts2 = true, QPts4 = false, QPts8 = false} ); }
public static async Task<DataCalls> GetCategorizedCallsAsync(this IRepositoryAsync<Log> LogRepository, LogCategory LogCategory, string SelectedContestName, string CallChar, Logqso.mvc.common.Enum.CallGroupEnum CallGroup, bool Disabled, string Username) { return await GetCategorizedCalls(LogRepository, LogCategory, SelectedContestName, CallChar, CallGroup, Disabled, Username); }
//both GetCategorizedCalls and GetCategorizedCall2 methoda work. //GetCategorizedCalls2 uses the predicate builder along with asExpandable() //GetCategorizedCalls uses the Where extensions in DynamicLibrary.cs in the using System.Data.Entity namespace public static Task<DataCalls> GetCategorizedCalls(this IRepositoryAsync<Log> _LogRepository, LogCategory LogCategory, string SelectedContestName, string SelectedCall, Logqso.mvc.common.Enum.CallGroupEnum CallGroup, bool Disabled, string Username) { //The passed in _LogRepository has a DataContext from Dependency resolver //The Unit of work DataContext does not match the DataContext of the _Logrespository //SOLUTION: use the _LogRepository to get a LogRespositpry with the UoW DataContext //This allows the join below to have all of the expression trees point to the same DBContext. //This hook fixes a problem that should not occur, var LogRepository = _LogRepository.GetRepository<Log>(); DataCalls DataCalls = new DataCalls(); string CallChar = SelectedCall.Substring(0, 1); if ( (int)CallChar[0] >= 48 && (int)CallChar[0] <= 57) { CallChar = "1"; } var LogCategoryRepository = LogRepository.GetRepository<LogCategory>(); IQueryFluent<LogCategory> LogCategorys = LogCategoryRepository.Query(); var LogCategoryQ = LogCategorys.SelectQueryable(false); if (Disabled == false) {// business rules if (LogCategory.CatOperatorEnum == (int)CatOperatorEnum.SINGLE_OP) { LogCategory.CatNoOfTxEnum = (int)CatNoOfTxEnum.ALL; } else if (LogCategory.CatOperatorEnum == (int)CatOperatorEnum.MULTI_OP) { LogCategory.CatBandEnum = (int)CatBandEnum.ALL; if (LogCategory.CatNoOfTxEnum != (int)CatNoOfTxEnum.ONE) { LogCategory.CatPowerEnum = (int)CatPowerEnum.ALL; } LogCategory.CatAssistedEnum = (int)CatAssistedEnum.ALL; } else if (LogCategory.CatOperatorEnum == (int)CatOperatorEnum.CHECKLOG) { LogCategory.CatBandEnum = (int)CatBandEnum.ALL; LogCategory.CatPowerEnum = (int)CatPowerEnum.ALL; LogCategory.CatAssistedEnum = (int)CatAssistedEnum.ALL; LogCategory.CatNoOfTxEnum = (int)CatNoOfTxEnum.ALL; } else { //all } } else {//all disabled LogCategory.CatOperatorEnum = (int)CatOperatorEnum.ALL; LogCategory.CatBandEnum = (int)CatBandEnum.ALL; LogCategory.CatPowerEnum = (int)CatPowerEnum.ALL; LogCategory.CatAssistedEnum = (int)CatAssistedEnum.ALL; LogCategory.CatNoOfTxEnum = (int)CatNoOfTxEnum.ALL; } //Using Predicate var Predicate = PredicateBuilder.True<LogCategory>(); if (LogCategory.CatAssistedEnum != (int)CatAssistedEnum.ALL) { Predicate = Predicate.And(p => p.CatAssistedEnum == LogCategory.CatAssistedEnum); } if (LogCategory.CatBandEnum != (int)CatBandEnum.ALL) { Predicate = Predicate.And(p => p.CatBandEnum == LogCategory.CatBandEnum); } if (LogCategory.CatNoOfTxEnum != (int)CatNoOfTxEnum.ALL) { Predicate = Predicate.And(p => p.CatNoOfTxEnum == LogCategory.CatNoOfTxEnum); } if (LogCategory.CatOperatorEnum != (int)CatOperatorEnum.ALL) { Predicate = Predicate.And(p => p.CatOperatorEnum == LogCategory.CatOperatorEnum); } if (LogCategory.CatOperatorOverlayEnum != null && LogCategory.CatOperatorOverlayEnum != (int)CatOperatorOverlayEnum.NONE) { Predicate = Predicate.And(p => p.CatOperatorOverlayEnum == LogCategory.CatOperatorOverlayEnum); } if (LogCategory.CatPowerEnum != (int)CatPowerEnum.ALL) { Predicate = Predicate.And(p => p.CatPowerEnum == LogCategory.CatPowerEnum); } var ContestRepository = LogRepository.GetRepository<Contest>(); IQueryFluent<Contest> Contests = ContestRepository.Query(); var ContestQ = Contests. SelectQueryable(false).Where(x => x.ContestName == SelectedContestName).FirstOrDefault(); var CallSignRepository = LogRepository.GetRepository<CallSign>(); IQueryFluent<CallSign> CallSigns = CallSignRepository.Query(); IQueryFluent<Log> Logs = LogRepository.Query(); var LogQ1 = Logs .SelectQueryable(false).Where(x => x.ContestId == ContestQ.ContestId); CallSignRepository.SetSQLLogging(true); Predicate = Predicate.And(p => LogQ1.Any(o => o.LogCategoryId == p.LogCategoryId && o.ContestId == ContestQ.ContestId)); //http://www.albahari.com/nutshell/predicatebuilder.aspx var LogCateorySBSet = LogCategoryRepository.Queryable(); var LogCategoryQ2 = LogCateorySBSet.AsExpandable().Where(Predicate); //NOTE //Unfortunately there's no way to use Predicate<T> in EF linq since it's impossible to map it on SQL query. //This can be done with Expressions only because they can be parsed and converted to SQL //Predicate works on two tavles that have a relationship ONLY // LogCategoryQ2 is an Iqueryable with contes qualified //CallsignQ is an Iquertable qualified by the first char CallChar ICollection<CallGroupCall> CallGroupCalls = null; try { if (CallChar == "1") {//get all calls beginning with 1 through nine. var CallSignQ = CallSigns.SelectQueryable(false); CallGroupCalls = (from lc in CallSignQ join lq in LogQ1 on lc.CallSignId equals lq.CallsignId join lx in LogCategoryQ2 on lq.LogCategoryId equals lx.LogCategoryId where new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9" }.Contains(lc.Call.Substring(0, 1)) select new CallGroupCall { CallSignID = lc.CallSignId, Call = lc.Call } ).OrderBy(x => x.Call).ToList(); } else { var CallSignQ = CallSigns.SelectQueryable(false).Where(c => c.Call.Substring(0, 1) == CallChar); CallGroupCalls = (from lc in CallSignQ join lq in LogQ1 on lc.CallSignId equals lq.CallsignId join lx in LogCategoryQ2 on lq.LogCategoryId equals lx.LogCategoryId select new CallGroupCall { CallSignID = lc.CallSignId, Call = lc.Call } ).OrderBy(x => x.Call).ToList(); } } catch (Exception ex) { // throw; } DataCalls.CallGroup = CallGroup; DataCalls.SelectedCall = SelectedCall; DataCalls.Calls = CallGroupCalls; CallSignRepository.SetSQLLogging(false); return Task.FromResult(DataCalls); }
//both GetCategorizedCalls and GetCategorizedCall2 methoda work. //GetCategorizedCalls2 uses the predicate builder along with asExpandable() //GetCategorizedCalls uses the Where extensions in DynamicLibrary.cs in the using System.Data.Entity namespace public static Task<DataCalls> GetCategorizedCalls2(this IRepository<Log> _LogRepository, LogCategory LogCategory, string SelectedContestName, string SelectedCall, Logqso.mvc.common.Enum.CallGroupEnum CallGroup, bool Disabled, string Username) { //The passed in _LogRepository has a DataContext from Dependency resolver //The Unit of work DataContext does not match the DataContext of the _Logrespository //SOLUTION: use the _LogRepository to get a LogRespositpry with the UoW DataContext //This allows the join below to have all of the expression trees point to the same DBContext. //This hook fixes a problem that should not occur, var LogRepository = _LogRepository.GetRepository<Log>(); DataCalls DataCalls = new DataCalls(); string CallChar = SelectedCall.Substring(0, 1); var CallSignRepository = LogRepository.GetRepository<CallSign>(); IQueryFluent<CallSign> CallSigns = CallSignRepository.Query(); CallSignRepository.SetSQLLogging(true); var LogCategoryRepository = LogRepository.GetRepository<LogCategory>(); IQueryFluent<LogCategory> LogCategorys = LogCategoryRepository.Query(); var LogCategoryQ = LogCategorys.SelectQueryable(false); //LogCategory LogCategoryQ = LogCategorys // .SelectQueryable(false).Where( // l => l.CatAssistedEnum == LogCategory.CatAssistedEnum && // l.CatBandEnum == LogCategory.CatBandEnum && // l.CatNoOfTxEnum == LogCategory.CatNoOfTxEnum && // l.CatOperatorEnum == LogCategory.CatOperatorEnum && // l.CatOperatorOverlayEnum == LogCategory.CatOperatorOverlayEnum && // l.CatPowerEnum == LogCategory.CatPowerEnum // ).SingleOrDefault(); var ContestRepository = LogRepository.GetRepository<Contest>(); IQueryFluent<Contest> Contests = ContestRepository.Query(); var ContestQ = Contests. SelectQueryable(false).Where(x => x.ContestName == SelectedContestName).FirstOrDefault(); IQueryFluent<Log> Logs = LogRepository.Query(); var LogQ1 = Logs // .Include(x => x.CallSign) //.Include(x=>x.LogCategory) .SelectQueryable(false).Where(x => x.ContestId == ContestQ.ContestId); String LogCategoryPredicate = "true "; //string.Empty; if (Disabled == false) {// business rules if (LogCategory.CatOperatorEnum == (int)CatOperatorEnum.SINGLE_OP) { LogCategory.CatNoOfTxEnum = (int)CatNoOfTxEnum.ALL; } else if (LogCategory.CatOperatorEnum == (int)CatOperatorEnum.MULTI_OP) { LogCategory.CatBandEnum = (int)CatBandEnum.ALL; if (LogCategory.CatNoOfTxEnum != (int)CatNoOfTxEnum.ONE) { LogCategory.CatPowerEnum = (int)CatPowerEnum.ALL; } LogCategory.CatAssistedEnum = (int)CatAssistedEnum.ALL; } else if (LogCategory.CatOperatorEnum == (int)CatOperatorEnum.CHECKLOG) { LogCategory.CatBandEnum = (int)CatBandEnum.ALL; LogCategory.CatPowerEnum = (int)CatPowerEnum.ALL; LogCategory.CatAssistedEnum = (int)CatAssistedEnum.ALL; LogCategory.CatNoOfTxEnum = (int)CatNoOfTxEnum.ALL; } else { //all } } else {//all disabled LogCategory.CatBandEnum = (int)CatBandEnum.ALL; LogCategory.CatPowerEnum = (int)CatPowerEnum.ALL; LogCategory.CatAssistedEnum = (int)CatAssistedEnum.ALL; LogCategory.CatNoOfTxEnum = (int)CatNoOfTxEnum.ALL; } if (LogCategory.CatAssistedEnum != (int)CatAssistedEnum.ALL) { LogCategoryPredicate = string.Format("{0} AND CatAssistedEnum = {1} ", LogCategoryPredicate, LogCategory.CatAssistedEnum); } if (LogCategory.CatBandEnum != (int)CatBandEnum.ALL) { LogCategoryPredicate = string.Format("{0} AND CatBandEnum = {1} ", LogCategoryPredicate, LogCategory.CatBandEnum); } if (LogCategory.CatNoOfTxEnum != (int)CatNoOfTxEnum.ALL) { LogCategoryPredicate = string.Format("{0} AND CatNoOfTxEnum = {1} ", LogCategoryPredicate, LogCategory.CatNoOfTxEnum); } if (LogCategory.CatOperatorEnum != (int)CatOperatorEnum.ALL) { LogCategoryPredicate = string.Format("{0} AND CatOperatorEnum = {1} ", LogCategoryPredicate, LogCategory.CatOperatorEnum); } if (LogCategory.CatOperatorOverlayEnum != null && LogCategory.CatOperatorOverlayEnum != (int)CatOperatorOverlayEnum.NONE) { LogCategoryPredicate = string.Format("{0} AND CatOperatorOverlayEnum = {1} ", LogCategoryPredicate, LogCategory.CatOperatorOverlayEnum); } if (LogCategory.CatPowerEnum != (int)CatPowerEnum.ALL) { LogCategoryPredicate = string.Format("{0} AND CatPowerEnum = {1} ", LogCategoryPredicate, LogCategory.CatPowerEnum); } var LogCateoryDBSet = LogCategoryRepository.Queryable(); var LogCategoryQ2 = LogCateoryDBSet.AsExpandable().Where(LogCategoryPredicate); ICollection<CallGroupCall> CallGroupCalls = null; try { if (CallChar == "1") {//get all calls beginning with 1 through nine. var CallSignQ = CallSigns.SelectQueryable(false); CallGroupCalls = (from lc in CallSignQ join lq in LogQ1 on lc.CallSignId equals lq.CallsignId join lx in LogCategoryQ2 on lq.LogCategoryId equals lx.LogCategoryId where new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9" }.Contains(lc.Call.Substring(0, 1)) select new CallGroupCall { CallSignID = lc.CallSignId, Call = lc.Call } ).OrderBy(x => x.Call).ToList(); } else { var CallSignQ = CallSigns.SelectQueryable(false).Where(c => c.Call.Substring(0, 1) == CallChar); CallGroupCalls = (from lc in CallSignQ join lq in LogQ1 on lc.CallSignId equals lq.CallsignId join lx in LogCategoryQ2 on lq.LogCategoryId equals lx.LogCategoryId select new CallGroupCall { CallSignID = lc.CallSignId, Call = lc.Call } ).OrderBy(x => x.Call).ToList(); } DataCalls.CallGroup = CallGroup; DataCalls.SelectedCall = SelectedCall; DataCalls.Calls = CallGroupCalls; CallSignRepository.SetSQLLogging(false); } catch (Exception ex) { // throw; } #if false //var Log = LogQ.ToList(); //var cs = CallSignQ.Where(x => x.Call.Substring(0, 1) == CallChar).ToList(); //var res = (from lq in LogQ // join lc in CallSignQ on lq.CallsignId equals lc.CallSignId // where (lc.Call.Substring(0, 1) == CallChar) // select lq // ).ToList(); //var res2 = (from lq in LogQ // join lc in CallSignQ on lq.CallsignId equals lc.CallSignId // where (lc.Call.Substring(0, 1) == CallChar) // select lc // ).ToList(); if (CallChar == "1") {//get all calls beginning with 1 through nine. var CallGroupCalls = (from lc in CallSignQ join lq in LogQ1 on lc.CallSignId equals lq.CallsignId where new[] { "1", "2", "3", "4", "5", "6","7", "8", "9" }.Contains(lc.Call.Substring(0, 1) ) select new CallGroupCall { CallSignID = lc.CallSignId, Call = lc.Call } ).OrderBy(x => x.Call).ToList(); DataCalls.CallGroup = CallGroup; DataCalls.SelectedCall = SelectedCall; DataCalls.Calls = CallGroupCalls; } else { //// string SQLquery2012 = " SELECT " + //// "[Project1].[CallSignId] AS [CallSignId], " + ////" [Project1].[Call] AS [Call] " + //// "FROM ( SELECT " + //// " [Extent1].[CallSignId] AS [CallSignId], " + //// " [Extent1].[Call] AS [Call] " + //// " FROM [dbo].[CallSign] AS [Extent1] " + //// " INNER JOIN [dbo].[Log] AS [Extent2] ON [Extent1].[CallSignId] = [Extent2].[CallsignId] " + //// " WHERE (([Extent2].[ContestId] = 'CQWWSSB2014' ) AND ((SUBSTRING([Extent1].[Call], 0 + 1, 1)) = 'C' ) ) " + ////" ) AS [Project1]"; //// var CallGroupCalls12 = CallSigns.SqlQuery(SQLquery2012).ToList();; //// //var CallGroupCalls = CallGroupCalls12.ToList<CallGroupCall>(); //ef 6 sql2012 //declare @p__linq__0 varchar(50) //set @p__linq__0 = 'CQWWSSB2014' //declare @p__linq__1 varchar(50) //set @p__linq__1 = 'C' //SELECT // [Project1].[CallSignId] AS [CallSignId], // [Project1].[Call] AS [Call] // FROM ( SELECT // [Extent1].[CallSignId] AS [CallSignId], // [Extent1].[Call] AS [Call] // FROM [dbo].[CallSign] AS [Extent1] // INNER JOIN [dbo].[Log] AS [Extent2] ON [Extent1].[CallSignId] = [Extent2].[CallsignId] // WHERE (([Extent2].[ContestId] = @p__linq__0) OR (([Extent2].[ContestId] IS NULL) AND (@p__linq__0 IS NULL))) AND (((SUBSTRING([Extent1].[Call], 0 + 1, 1)) = @p__linq__1) OR ((SUBSTRING([Extent1].[Call], 0 + 1, 1) IS NULL) AND (@p__linq__1 IS NULL))) // ) AS [Project1] // ORDER BY [Project1].[Call] ASC var CallGroupCalls = (from lc in CallSignQ join lq in LogQ1 on lc.CallSignId equals lq.CallsignId where (lc.Call.Substring(0, 1) == CallChar) //where new[] { CallChar }.Contains(lc.Call.Substring(0, 1)) select new CallGroupCall { CallSignID = lc.CallSignId, Call = lc.Call } ).OrderBy(x => x.Call).ToList(); // var CallGroupCalls = CallGroupCalls1.ToList(); ////var CallGroupCalls = (from lc in CallSignQ //// join lq in LogQ1 on lc.CallSignId equals lq.CallsignId //// //where (lc.Call.Substring(0, 1) == CallChar) //// where new[] { CallChar }.Contains(lc.Call.Substring(0, 1)) //// select new CallGroupCall //// { //// CallSignID = lc.CallSignId, //// Call = lc.Call //// } //// ).OrderBy(x => x.Call).ToList(); //var CallGroupCalls = (from lq in LogQ1 // join lc in CallSignQ on lq.CallsignId equals lc.CallSignId // where (lc.Call.Substring(0, 1) == CallChar) // select new CallGroupCall // { // CallSignID = lq.CallSign.CallSignId, // Call = lq.CallSign.Call // } // ).OrderBy(x => x.Call).ToList(); DataCalls.CallGroup = CallGroup; DataCalls.SelectedCall = SelectedCall; DataCalls.Calls = CallGroupCalls; CallSignRepository.SetSQLLogging(false); } }
public static void SeedFilters(Logqso.mvc.DataModel.LogControl.LogControlDB context) { //called by // FiltersSeeds.SeedFilters( context) in LoalControlDB.cs context.FiltBand.AddOrUpdate( p => p.FiltBandName, new FiltBand { FiltBnd = CatBandEnum.ALL, FiltBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum.ALL), Index = 1 }, new FiltBand { FiltBnd = CatBandEnum._160M, FiltBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._160M).Replace("_", ""), Index = 2 }, new FiltBand { FiltBnd = CatBandEnum._80M, FiltBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._80M).Replace("_", ""), Index = 3 }, new FiltBand { FiltBnd = CatBandEnum._40M, FiltBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._40M).Replace("_", ""), Index = 4 }, new FiltBand { FiltBnd = CatBandEnum._20M, FiltBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._20M).Replace("_", ""), Index = 5 }, new FiltBand { FiltBnd = CatBandEnum._15M, FiltBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._15M).Replace("_", ""), Index = 6 }, new FiltBand { FiltBnd = CatBandEnum._10M, FiltBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._10M).Replace("_", ""), Index = 7 } ); context.FiltContinent.AddOrUpdate( p => p.FiltContName, new FiltContinent { FiltCont = ContinentEnum.ALL, FiltContName = Enum.GetName(typeof(ContinentEnum), ContinentEnum.ALL), Index = 1 }, new FiltContinent { FiltCont = ContinentEnum.NA, FiltContName = Enum.GetName(typeof(ContinentEnum), ContinentEnum.NA), Index = 2 }, new FiltContinent { FiltCont = ContinentEnum.EU, FiltContName = Enum.GetName(typeof(ContinentEnum), ContinentEnum.EU), Index = 3 }, new FiltContinent { FiltCont = ContinentEnum.AS, FiltContName = Enum.GetName(typeof(ContinentEnum), ContinentEnum.AS), Index = 4 }, new FiltContinent { FiltCont = ContinentEnum.OC, FiltContName = Enum.GetName(typeof(ContinentEnum), ContinentEnum.OC), Index = 5 }, new FiltContinent { FiltCont = ContinentEnum.SA, FiltContName = Enum.GetName(typeof(ContinentEnum), ContinentEnum.SA), Index = 6 }, new FiltContinent { FiltCont = ContinentEnum.AF, FiltContName = Enum.GetName(typeof(ContinentEnum), ContinentEnum.AF), Index = 7 } ); context.FiltCQZone.AddOrUpdate( p => p.FiltCQZoneVal, new FiltCQZone { FiltCQZoneVal = "ALL", Index = 1 }, new FiltCQZone { FiltCQZoneVal = "1", Index = 2 }, new FiltCQZone { FiltCQZoneVal = "2", Index = 3 }, new FiltCQZone { FiltCQZoneVal = "3", Index = 4 }, new FiltCQZone { FiltCQZoneVal = "4", Index = 5 }, new FiltCQZone { FiltCQZoneVal = "5", Index = 6 }, new FiltCQZone { FiltCQZoneVal = "6", Index = 7 }, new FiltCQZone { FiltCQZoneVal = "7", Index = 8 }, new FiltCQZone { FiltCQZoneVal = "8", Index = 9 }, new FiltCQZone { FiltCQZoneVal = "9", Index = 10 }, new FiltCQZone { FiltCQZoneVal = "10", Index = 11 }, new FiltCQZone { FiltCQZoneVal = "11", Index = 12 }, new FiltCQZone { FiltCQZoneVal = "12", Index = 13 }, new FiltCQZone { FiltCQZoneVal = "13", Index = 14 }, new FiltCQZone { FiltCQZoneVal = "14", Index = 15 }, new FiltCQZone { FiltCQZoneVal = "15", Index = 16 }, new FiltCQZone { FiltCQZoneVal = "16", Index = 17 }, new FiltCQZone { FiltCQZoneVal = "17", Index = 18 }, new FiltCQZone { FiltCQZoneVal = "18", Index = 19 }, new FiltCQZone { FiltCQZoneVal = "19", Index = 20 }, new FiltCQZone { FiltCQZoneVal = "20", Index = 21 }, new FiltCQZone { FiltCQZoneVal = "21", Index = 22 }, new FiltCQZone { FiltCQZoneVal = "22", Index = 23 }, new FiltCQZone { FiltCQZoneVal = "23", Index = 24 }, new FiltCQZone { FiltCQZoneVal = "24", Index = 25 }, new FiltCQZone { FiltCQZoneVal = "25", Index = 26 }, new FiltCQZone { FiltCQZoneVal = "26", Index = 27 }, new FiltCQZone { FiltCQZoneVal = "27", Index = 28 }, new FiltCQZone { FiltCQZoneVal = "28", Index = 29 }, new FiltCQZone { FiltCQZoneVal = "29", Index = 30 }, new FiltCQZone { FiltCQZoneVal = "30", Index = 31 }, new FiltCQZone { FiltCQZoneVal = "31", Index = 32 }, new FiltCQZone { FiltCQZoneVal = "32", Index = 33 }, new FiltCQZone { FiltCQZoneVal = "33", Index = 34 }, new FiltCQZone { FiltCQZoneVal = "34", Index = 35 }, new FiltCQZone { FiltCQZoneVal = "35", Index = 36 }, new FiltCQZone { FiltCQZoneVal = "36", Index = 37 }, new FiltCQZone { FiltCQZoneVal = "37", Index = 38 }, new FiltCQZone { FiltCQZoneVal = "38", Index = 39 }, new FiltCQZone { FiltCQZoneVal = "39", Index = 40 }, new FiltCQZone { FiltCQZoneVal = "40", Index = 41 } ); //This country data was crweated with an access report QCountries2 // single text box wit source : ="new FiltCountry { Prefix = " & '"' & [Prefix] & '", CountryName ="' & [QCountries.Name] & '"},' //report exported t word rtf fikle //select all and paste here context.FiltPrefix.AddOrUpdate( p => p.FiltPref, new FiltPrefix { FiltPref = "-", CountryName = "ALL" }, new FiltPrefix { FiltPref = "LU", CountryName ="Argentina"}, new FiltPrefix { FiltPref = "VP5", CountryName = "Turks & Caicos" }, new FiltPrefix { FiltPref = "HI", CountryName = "Dominican Republ" }, new FiltPrefix { FiltPref = "VE", CountryName = "Canada" }, new FiltPrefix { FiltPref = "K", CountryName = "United States" }, new FiltPrefix { FiltPref = "KP2", CountryName = "Virgin Is." }, new FiltPrefix { FiltPref = "PJ2", CountryName = "Netherlands Anti" }, new FiltPrefix { FiltPref = "FY", CountryName = "French Guiana" }, new FiltPrefix { FiltPref = "EA", CountryName = "Spain" }, new FiltPrefix { FiltPref = "DL", CountryName = "Germany" }, new FiltPrefix { FiltPref = "LA", CountryName = "Norway" }, new FiltPrefix { FiltPref = "OZ", CountryName = "Denmark" }, new FiltPrefix { FiltPref = "GM", CountryName = "Scotland" }, new FiltPrefix { FiltPref = "PA", CountryName = "Netherlands" }, new FiltPrefix { FiltPref = "ON", CountryName = "Belgium" }, new FiltPrefix { FiltPref = "F", CountryName = "France" }, new FiltPrefix { FiltPref = "SM", CountryName = "Sweden" }, new FiltPrefix { FiltPref = "HB0", CountryName = "Liechtenstein" }, new FiltPrefix { FiltPref = "YL", CountryName = "Latvia" }, new FiltPrefix { FiltPref = "S5", CountryName = "Slovenia" }, new FiltPrefix { FiltPref = "OK", CountryName = "Czech Republic" }, new FiltPrefix { FiltPref = "GI", CountryName = "Northern Ireland" }, new FiltPrefix { FiltPref = "GW", CountryName = "Wales" }, new FiltPrefix { FiltPref = "OE", CountryName = "Austria" }, new FiltPrefix { FiltPref = "LY", CountryName = "Lithuania" }, new FiltPrefix { FiltPref = "G", CountryName = "England" }, new FiltPrefix { FiltPref = "OM", CountryName = "Slovakia" }, new FiltPrefix { FiltPref = "SV9", CountryName = "Crete" }, new FiltPrefix { FiltPref = "HA", CountryName = "Hungary" }, new FiltPrefix { FiltPref = "YU", CountryName = "Serbia" }, new FiltPrefix { FiltPref = "CT3", CountryName = "Madeira Is." }, new FiltPrefix { FiltPref = "6Y", CountryName = "Jamaica" }, new FiltPrefix { FiltPref = "9A", CountryName = "Croatia" }, new FiltPrefix { FiltPref = "I", CountryName = "Italy" }, new FiltPrefix { FiltPref = "UR", CountryName = "Ukraine" }, new FiltPrefix { FiltPref = "IT9", CountryName = "Sicily" }, new FiltPrefix { FiltPref = "ES", CountryName = "Estonia" }, new FiltPrefix { FiltPref = "VP2E", CountryName = "Anguilla" }, new FiltPrefix { FiltPref = "YN", CountryName = "Nicaragua" }, new FiltPrefix { FiltPref = "UA", CountryName = "European Russia" }, new FiltPrefix { FiltPref = "4O", CountryName = "Montenegro" }, new FiltPrefix { FiltPref = "YO", CountryName = "Romania" }, new FiltPrefix { FiltPref = "OH", CountryName = "Finland" }, new FiltPrefix { FiltPref = "CT", CountryName = "Portugal" }, new FiltPrefix { FiltPref = "E7", CountryName = "Bosnia-Herzegovi" }, new FiltPrefix { FiltPref = "EA6", CountryName = "Balearic Is." }, new FiltPrefix { FiltPref = "IS", CountryName = "Sardinia" }, new FiltPrefix { FiltPref = "3V", CountryName = "Tunisia" }, new FiltPrefix { FiltPref = "HB", CountryName = "Switzerland" }, new FiltPrefix { FiltPref = "9Y", CountryName = "Trinidad & Tobag" }, new FiltPrefix { FiltPref = "LZ", CountryName = "Bulgaria" }, new FiltPrefix { FiltPref = "C3", CountryName = "Andorra" }, new FiltPrefix { FiltPref = "SP", CountryName = "Poland" }, new FiltPrefix { FiltPref = "UA2", CountryName = "Kaliningrad" }, new FiltPrefix { FiltPref = "5B", CountryName = "Cyprus" }, new FiltPrefix { FiltPref = "UA9", CountryName = "Asiatic Russia" }, new FiltPrefix { FiltPref = "EU", CountryName = "Belarus" }, new FiltPrefix { FiltPref = "ER", CountryName = "Moldova" }, new FiltPrefix { FiltPref = "Z3", CountryName = "Macedonia" }, new FiltPrefix { FiltPref = "6W", CountryName = "Senegal" }, new FiltPrefix { FiltPref = "SV5", CountryName = "Dodecanese" }, new FiltPrefix { FiltPref = "UN", CountryName = "Kazakhstan" }, new FiltPrefix { FiltPref = "PY", CountryName = "Brazil" }, new FiltPrefix { FiltPref = "CN", CountryName = "Morocco" }, new FiltPrefix { FiltPref = "TA", CountryName = "Turkey" }, new FiltPrefix { FiltPref = "OH0", CountryName = "Aland Is." }, new FiltPrefix { FiltPref = "SV", CountryName = "Greece" }, new FiltPrefix { FiltPref = "D4", CountryName = "Cape Verde" }, new FiltPrefix { FiltPref = "V4", CountryName = "St. Kitts & Nevi" }, new FiltPrefix { FiltPref = "JA", CountryName = "Japan" }, new FiltPrefix { FiltPref = "KH6", CountryName = "Hawaii" }, new FiltPrefix { FiltPref = "ZS", CountryName = "South Africa" }, new FiltPrefix { FiltPref = "5Z", CountryName = "Kenya" }, new FiltPrefix { FiltPref = "A7", CountryName = "Qatar" }, new FiltPrefix { FiltPref = "V5", CountryName = "Namibia" }, new FiltPrefix { FiltPref = "EA8", CountryName = "Canary Is." }, new FiltPrefix { FiltPref = "HZ", CountryName = "Saudi Arabia" }, new FiltPrefix { FiltPref = "5R", CountryName = "Madagascar" }, new FiltPrefix { FiltPref = "4X", CountryName = "Israel" }, new FiltPrefix { FiltPref = "3DA", CountryName = "Swaziland" }, new FiltPrefix { FiltPref = "YB", CountryName = "Indonesia" }, new FiltPrefix { FiltPref = "A4", CountryName = "Oman" }, new FiltPrefix { FiltPref = "EK", CountryName = "Armenia" }, new FiltPrefix { FiltPref = "HS", CountryName = "Thailand" }, new FiltPrefix { FiltPref = "9K", CountryName = "Kuwait" }, new FiltPrefix { FiltPref = "CX", CountryName = "Uruguay" }, new FiltPrefix { FiltPref = "SU", CountryName = "Egypt" }, new FiltPrefix { FiltPref = "5H", CountryName = "Tanzania" }, new FiltPrefix { FiltPref = "ZP", CountryName = "Paraguay" }, new FiltPrefix { FiltPref = "ET", CountryName = "Ethiopia" }, new FiltPrefix { FiltPref = "VK", CountryName = "Australia" }, new FiltPrefix { FiltPref = "EX", CountryName = "Kyrgyzstan" }, new FiltPrefix { FiltPref = "TY", CountryName = "Benin" }, new FiltPrefix { FiltPref = "4L", CountryName = "Georgia" }, new FiltPrefix { FiltPref = "T8", CountryName = "Palau" }, new FiltPrefix { FiltPref = "BY", CountryName = "China" }, new FiltPrefix { FiltPref = "VU", CountryName = "India" }, new FiltPrefix { FiltPref = "BV", CountryName = "Taiwan" }, new FiltPrefix { FiltPref = "XU", CountryName = "Kampuchea" }, new FiltPrefix { FiltPref = "HL", CountryName = "South Korea" }, new FiltPrefix { FiltPref = "KH2", CountryName = "Guam" }, new FiltPrefix { FiltPref = "9V", CountryName = "Singapore" }, new FiltPrefix { FiltPref = "LX", CountryName = "Luxembourg" }, new FiltPrefix { FiltPref = "VR", CountryName = "Hong Kong" }, new FiltPrefix { FiltPref = "TA1", CountryName = "Turkey (Europe)" }, new FiltPrefix { FiltPref = "9H", CountryName = "Malta" }, new FiltPrefix { FiltPref = "EI", CountryName = "Ireland" }, new FiltPrefix { FiltPref = "A9", CountryName = "Bahrain" }, new FiltPrefix { FiltPref = "J8", CountryName = "St. Vincent" }, new FiltPrefix { FiltPref = "DU", CountryName = "Philippines" }, new FiltPrefix { FiltPref = "VU4", CountryName = "Andaman & Nicoba" }, new FiltPrefix { FiltPref = "9M6", CountryName = "East Malaysia" }, new FiltPrefix { FiltPref = "HK", CountryName = "Colombia" }, new FiltPrefix { FiltPref = "KP4", CountryName = "Puerto Rico" }, new FiltPrefix { FiltPref = "3A", CountryName = "Monaco" }, new FiltPrefix { FiltPref = "YV", CountryName = "Venezuela" }, new FiltPrefix { FiltPref = "FM", CountryName = "Martinique" }, new FiltPrefix { FiltPref = "TZ", CountryName = "Mali" }, new FiltPrefix { FiltPref = "XE", CountryName = "Mexico" }, new FiltPrefix { FiltPref = "HP", CountryName = "Panama" }, new FiltPrefix { FiltPref = "V3", CountryName = "Belize" }, new FiltPrefix { FiltPref = "TI", CountryName = "Costa Rica" }, new FiltPrefix { FiltPref = "CE", CountryName = "Chile" }, new FiltPrefix { FiltPref = "3B8", CountryName = "Mauritius" }, new FiltPrefix { FiltPref = "9J", CountryName = "Zambia" }, new FiltPrefix { FiltPref = "ZL", CountryName = "New Zealand" }, new FiltPrefix { FiltPref = "JT", CountryName = "Mongolia" }, new FiltPrefix { FiltPref = "TK", CountryName = "Corsica" }, new FiltPrefix { FiltPref = "UK", CountryName = "Uzbekistan" }, new FiltPrefix { FiltPref = "GM/s", CountryName = "Shetland" }, new FiltPrefix { FiltPref = "V8", CountryName = "Brunei" }, new FiltPrefix { FiltPref = "P2", CountryName = "Papua New Guinea" }, new FiltPrefix { FiltPref = "GD", CountryName = "Isle of Man" }, new FiltPrefix { FiltPref = "A6", CountryName = "United Arab Emir" }, new FiltPrefix { FiltPref = "TR", CountryName = "Gabon" }, new FiltPrefix { FiltPref = "ZC4", CountryName = "UK Bases on Cypr" }, new FiltPrefix { FiltPref = "TJ", CountryName = "Cameroon" }, new FiltPrefix { FiltPref = "JY", CountryName = "Jordan" }, new FiltPrefix { FiltPref = "KL", CountryName = "Alaska" }, new FiltPrefix { FiltPref = "V2", CountryName = "Antigua & Barbud" }, new FiltPrefix { FiltPref = "PZ", CountryName = "Suriname" }, new FiltPrefix { FiltPref = "IG9", CountryName = "Italy (Africa)" }, new FiltPrefix { FiltPref = "HC8", CountryName = "Galapagos Is." }, new FiltPrefix { FiltPref = "EY", CountryName = "Tajikistan" }, new FiltPrefix { FiltPref = "OX", CountryName = "Greenland" }, new FiltPrefix { FiltPref = "EA9", CountryName = "Ceuta and Melill" }, new FiltPrefix { FiltPref = "VP2V", CountryName = "British Virgin I" }, new FiltPrefix { FiltPref = "HR", CountryName = "Honduras" }, new FiltPrefix { FiltPref = "CU", CountryName = "Azores" }, new FiltPrefix { FiltPref = "TF", CountryName = "Iceland" }, new FiltPrefix { FiltPref = "ZA", CountryName = "Albania" }, new FiltPrefix { FiltPref = "FS", CountryName = "French St. Marti" }, new FiltPrefix { FiltPref = "KH0", CountryName = "Mariana Is." }, new FiltPrefix { FiltPref = "4J", CountryName = "Azerbaijan" }, new FiltPrefix { FiltPref = "VK9W", CountryName = "Willis I." }, new FiltPrefix { FiltPref = "9M2", CountryName = "West Malaysia" }, new FiltPrefix { FiltPref = "VU7", CountryName = "Laccadive Is." }, new FiltPrefix { FiltPref = "JW", CountryName = "Svalbard" }, new FiltPrefix { FiltPref = "ST", CountryName = "Sudan" }, new FiltPrefix { FiltPref = "8P", CountryName = "Barbados" }, new FiltPrefix { FiltPref = "J2", CountryName = "Djibouti" }, new FiltPrefix { FiltPref = "P4", CountryName = "Aruba" }, new FiltPrefix { FiltPref = "FJ", CountryName = "St. Barthelemy" }, new FiltPrefix { FiltPref = "ZF", CountryName = "Cayman Is." }, new FiltPrefix { FiltPref = "GU", CountryName = "Guernsey" }, new FiltPrefix { FiltPref = "OA", CountryName = "Peru" }, new FiltPrefix { FiltPref = "5U", CountryName = "Niger" }, new FiltPrefix { FiltPref = "OD", CountryName = "Lebanon" }, new FiltPrefix { FiltPref = "FR", CountryName = "Reunion" }, new FiltPrefix { FiltPref = "TG", CountryName = "Guatemala" }, new FiltPrefix { FiltPref = "KG4", CountryName = "Guantanamo Bay" }, new FiltPrefix { FiltPref = "Z2", CountryName = "Zimbabwe" }, new FiltPrefix { FiltPref = "HC", CountryName = "Ecuador" }, new FiltPrefix { FiltPref = "GJ", CountryName = "Jersey" }, new FiltPrefix { FiltPref = "OY", CountryName = "Faroe Is." }, new FiltPrefix { FiltPref = "CM", CountryName = "Cuba" }, new FiltPrefix { FiltPref = "5N", CountryName = "Nigeria" }, new FiltPrefix { FiltPref = "A3", CountryName = "Tonga" }, new FiltPrefix { FiltPref = "7X", CountryName = "Algeria" }, new FiltPrefix { FiltPref = "JD/o", CountryName = "Ogasawara" }, new FiltPrefix { FiltPref = "T32", CountryName = "Eastern Kiribati" }, new FiltPrefix { FiltPref = "XX9", CountryName = "Macau" }, new FiltPrefix { FiltPref = "VP9", CountryName = "Bermuda" }, new FiltPrefix { FiltPref = "YI", CountryName = "Iraq" }, new FiltPrefix { FiltPref = "5V", CountryName = "Togo" }, new FiltPrefix { FiltPref = "C6", CountryName = "Bahamas" }, new FiltPrefix { FiltPref = "FK", CountryName = "New Caledonia" }, new FiltPrefix { FiltPref = "CP", CountryName = "Bolivia" }, new FiltPrefix { FiltPref = "S7", CountryName = "Seychelles" }, new FiltPrefix { FiltPref = "4S", CountryName = "Sri Lanka" }, new FiltPrefix { FiltPref = "C5", CountryName = "Gambia" }, new FiltPrefix { FiltPref = "T7", CountryName = "San Marino" }, new FiltPrefix { FiltPref = "E5/s", CountryName = "South Cook Is." }, new FiltPrefix { FiltPref = "9L", CountryName = "Sierra Leone" }, new FiltPrefix { FiltPref = "FG", CountryName = "Guadeloupe" }, new FiltPrefix { FiltPref = "J3", CountryName = "Grenada" }, new FiltPrefix { FiltPref = "9Q", CountryName = "Rep. of Congo" }, new FiltPrefix { FiltPref = "8R", CountryName = "Guyana" }, new FiltPrefix { FiltPref = "YK", CountryName = "Syria" }, new FiltPrefix { FiltPref = "ZK2", CountryName = "Niue" }, new FiltPrefix { FiltPref = "T33", CountryName = "Banaba" }, new FiltPrefix { FiltPref = "JD/m", CountryName = "Minami Torishima" }, new FiltPrefix { FiltPref = "KH9", CountryName = "Wake I." }, new FiltPrefix { FiltPref = "HV", CountryName = "Vatican City" }, new FiltPrefix { FiltPref = "J6", CountryName = "St. Lucia" }, new FiltPrefix { FiltPref = "XW", CountryName = "Laos" }, new FiltPrefix { FiltPref = "YA", CountryName = "Afghanistan" }, new FiltPrefix { FiltPref = "5X", CountryName = "Uganda" }, new FiltPrefix { FiltPref = "ZD8", CountryName = "Ascension I." }, new FiltPrefix { FiltPref = "FH", CountryName = "Mayotte" }, new FiltPrefix { FiltPref = "TU", CountryName = "Cote d'Ivoire" }, new FiltPrefix { FiltPref = "8Q", CountryName = "Maldives" }, new FiltPrefix { FiltPref = "TN", CountryName = "Congo" }, new FiltPrefix { FiltPref = "9G", CountryName = "Ghana" }, new FiltPrefix { FiltPref = "AP", CountryName = "Pakistan" }, new FiltPrefix { FiltPref = "KH3", CountryName = "Johnston I." }, new FiltPrefix { FiltPref = "KH5", CountryName = "Palmyra & Jarvis" }, new FiltPrefix { FiltPref = "HH", CountryName = "Haiti" }, new FiltPrefix { FiltPref = "A5", CountryName = "Bhutan" }, new FiltPrefix { FiltPref = "V6", CountryName = "Micronesia" }, new FiltPrefix { FiltPref = "VP8/g", CountryName = "South Georgia" }, new FiltPrefix { FiltPref = "KH8", CountryName = "American Samoa" }, new FiltPrefix { FiltPref = "FO", CountryName = "French Polynesia" }, new FiltPrefix { FiltPref = "VP2M", CountryName = "Montserrat" }, new FiltPrefix { FiltPref = "EL", CountryName = "Liberia" }, new FiltPrefix { FiltPref = "PJ7", CountryName = "Sint Maarten" }, new FiltPrefix { FiltPref = "YS", CountryName = "El Salvador" }, new FiltPrefix { FiltPref = "TI9", CountryName = "Cocos I." }, new FiltPrefix { FiltPref = "9X", CountryName = "Rwanda" }, new FiltPrefix { FiltPref = "5A", CountryName = "Libya" }, new FiltPrefix { FiltPref = "CE9", CountryName = "Antarctica" }, new FiltPrefix { FiltPref = "VK9N", CountryName = "Norfolk I." }, new FiltPrefix { FiltPref = "JX", CountryName = "Jan Mayen" }, new FiltPrefix { FiltPref = "EZ", CountryName = "Turkmenistan" }, new FiltPrefix { FiltPref = "1S", CountryName = "Spratly Is." }, new FiltPrefix { FiltPref = "HK0/a", CountryName = "San Andres/Provi" }, new FiltPrefix { FiltPref = "S2", CountryName = "Bangladesh" }, new FiltPrefix { FiltPref = "KH4", CountryName = "Midway I." }, new FiltPrefix { FiltPref = "5W", CountryName = "Samoa" }, new FiltPrefix { FiltPref = "HM", CountryName = "North Korea" }, new FiltPrefix { FiltPref = "KP1", CountryName = "Navassa I." }, new FiltPrefix { FiltPref = "D2", CountryName = "Angola" }, new FiltPrefix { FiltPref = "S0", CountryName = "Western Sahara" }, new FiltPrefix { FiltPref = "VP8", CountryName = "Falkland Is." }, new FiltPrefix { FiltPref = "KP5", CountryName = "Desecheo I." }, new FiltPrefix { FiltPref = "T5", CountryName = "Somalia" }, new FiltPrefix { FiltPref = "PY0F", CountryName = "Fernando de Noro" }, new FiltPrefix { FiltPref = "TL", CountryName = "Central African " }, new FiltPrefix { FiltPref = "ZB", CountryName = "Gibraltar" }, new FiltPrefix { FiltPref = "XZ", CountryName = "Myanmar" }, new FiltPrefix { FiltPref = "S9", CountryName = "Sao Tome & Princ" }, new FiltPrefix { FiltPref = "ZD9", CountryName = "Tristan da Cunha" }, new FiltPrefix { FiltPref = "YJ", CountryName = "Vanuatu" }, new FiltPrefix { FiltPref = "T2", CountryName = "Tuvalu" }, new FiltPrefix { FiltPref = "EP", CountryName = "Iran" }, new FiltPrefix { FiltPref = "FW", CountryName = "Wallis & Futuna " }, new FiltPrefix { FiltPref = "V7", CountryName = "Marshall Is." }, new FiltPrefix { FiltPref = "3X", CountryName = "Guinea" }, new FiltPrefix { FiltPref = "XF4", CountryName = "Revilla Gigedo" }, new FiltPrefix { FiltPref = "C9", CountryName = "Mozambique" }, new FiltPrefix { FiltPref = "FP", CountryName = "St. Pierre & Miq" }, new FiltPrefix { FiltPref = "7P", CountryName = "Lesotho" }, new FiltPrefix { FiltPref = "9U", CountryName = "Burundi" }, new FiltPrefix { FiltPref = "A2", CountryName = "Botswana" }, new FiltPrefix { FiltPref = "3D2", CountryName = "Fiji" }, new FiltPrefix { FiltPref = "ZS8", CountryName = "Marion I." }, new FiltPrefix { FiltPref = "3W", CountryName = "Vietnam" }, new FiltPrefix { FiltPref = "YV0", CountryName = "Aves I." }, new FiltPrefix { FiltPref = "VK9C", CountryName = "Cocos-Keeling" }, new FiltPrefix { FiltPref = "J7", CountryName = "Dominica" }, new FiltPrefix { FiltPref = "KH1", CountryName = "Baker & Howland " }, new FiltPrefix { FiltPref = "C2", CountryName = "Nauru" }, new FiltPrefix { FiltPref = "KH7K", CountryName = "Kure I." }, new FiltPrefix { FiltPref = "VP6/d", CountryName = "Ducie I." }, new FiltPrefix { FiltPref = "ZL8", CountryName = "Kermadec Is." }, new FiltPrefix { FiltPref = "3C", CountryName = "Equatorial Guine" }, new FiltPrefix { FiltPref = "E3", CountryName = "Eritrea" }, new FiltPrefix { FiltPref = "ZL9", CountryName = "Auckland & Campb" }, new FiltPrefix { FiltPref = "J5", CountryName = "Guinea-Bissau" }, new FiltPrefix { FiltPref = "7O", CountryName = "Yemen" }, new FiltPrefix { FiltPref = "9N", CountryName = "Nepal" }, new FiltPrefix { FiltPref = "VK9M", CountryName = "Mellish Reef" }, new FiltPrefix { FiltPref = "FT5W", CountryName = "Crozet" }, new FiltPrefix { FiltPref = "T30", CountryName = "Western Kiribati" }, new FiltPrefix { FiltPref = "T31", CountryName = "Central Kiribati" }, new FiltPrefix { FiltPref = "E4", CountryName = "Palestine" }, new FiltPrefix { FiltPref = "ZD7", CountryName = "Saint Helena" }, new FiltPrefix { FiltPref = "TT", CountryName = "Chad" }, new FiltPrefix { FiltPref = "4U1I", CountryName = "ITU HQ Geneva" }, new FiltPrefix { FiltPref = "4U1U", CountryName = "United Nations H" }, new FiltPrefix { FiltPref = "VQ9", CountryName = "Chagos Islands" }, new FiltPrefix { FiltPref = "VP6", CountryName = "Pitcairn Island" }, new FiltPrefix { FiltPref = "D6", CountryName = "Comoros" }, new FiltPrefix { FiltPref = "ZK3", CountryName = "Tokelau" }, new FiltPrefix { FiltPref = "VK9X", CountryName = "Christmas Island" }, new FiltPrefix { FiltPref = "5T", CountryName = "Mauritania" }, new FiltPrefix { FiltPref = "ZL7", CountryName = "Chatham Islands" }, new FiltPrefix { FiltPref = "VP8/h", CountryName = "South Shetland" }, new FiltPrefix { FiltPref = "H4", CountryName = "Solomon Islands" }, new FiltPrefix { FiltPref = "CY0", CountryName = "Sable Island" }, new FiltPrefix { FiltPref = "BS7", CountryName = "Scarborough Reef" }, new FiltPrefix { FiltPref = "3B6", CountryName = "Agalega & St. Br" }, new FiltPrefix { FiltPref = "XT", CountryName = "Burkina Faso" }, new FiltPrefix { FiltPref = "4W", CountryName = "Timor-Leste" }, new FiltPrefix { FiltPref = "7Q", CountryName = "Malawi" }, new FiltPrefix { FiltPref = "VK0H", CountryName = "Heard Island" }, new FiltPrefix { FiltPref = "CE0Y", CountryName = "Easter Island" }, new FiltPrefix { FiltPref = "FK/c", CountryName = "Chesterfield Isl" }, new FiltPrefix { FiltPref = "R1FJ", CountryName = "Franz Josef Land" }, new FiltPrefix { FiltPref = "1A", CountryName = "Sov Mil Order of" }, new FiltPrefix { FiltPref = "3Y/b", CountryName = "Bouvet" }, new FiltPrefix { FiltPref = "3B9", CountryName = "Rodriguez Island" }, new FiltPrefix { FiltPref = "E5/n", CountryName = "North Cook Is." }, new FiltPrefix { FiltPref = "OJ0", CountryName = "Market Reef" }, new FiltPrefix { FiltPref = "PY0T", CountryName = "Trindade & Marti" }, new FiltPrefix { FiltPref = "SV/a", CountryName = "Mount Athos" }, new FiltPrefix { FiltPref = "4U1V", CountryName = "Vienna Intl Ctr" }, new FiltPrefix { FiltPref = "CE0Z", CountryName = "Juan Fernandez I" }, new FiltPrefix { FiltPref = "VK9L", CountryName = "Lord Howe I." }, new FiltPrefix { FiltPref = "JW/b", CountryName = "Bear I." }, new FiltPrefix { FiltPref = "CE0X", CountryName = "San Felix I." }, new FiltPrefix { FiltPref = "T9", CountryName = "Bosnia-Herzegovi" }, new FiltPrefix { FiltPref = "Z7", CountryName = "Montenegro" }, new FiltPrefix { FiltPref = "ZK1/s", CountryName = "South Cook Is." }, new FiltPrefix { FiltPref = "R1MV", CountryName = "Malyj Vysotskij " }, new FiltPrefix { FiltPref = "PJ4", CountryName = "Bonaire" }, new FiltPrefix { FiltPref = "PJ5", CountryName = "St. Eustatius & " }, new FiltPrefix { FiltPref = "VK0M", CountryName = "Macquarie Island" }, new FiltPrefix { FiltPref = "HK0/m", CountryName = "Malpelo Island" }, new FiltPrefix { FiltPref = "FO/m", CountryName = "Marquesas Island" }, new FiltPrefix { FiltPref = "ST0", CountryName = "Republic of Sout" }, new FiltPrefix { FiltPref = "VP8/o", CountryName = "South Orkney" }, new FiltPrefix { FiltPref = "FR/t", CountryName = "Tromelin" }, new FiltPrefix { FiltPref = "CY9", CountryName = "St. Paul Island" }, new FiltPrefix { FiltPref = "FO/c", CountryName = "Clipperton Islan" }, new FiltPrefix { FiltPref = "FR/g", CountryName = "Glorioso" }, new FiltPrefix { FiltPref = "Z6", CountryName = "Kosovo" }, new FiltPrefix { FiltPref = "KH5K", CountryName = "Kingman Reef" }, new FiltPrefix { FiltPref = "E6", CountryName = "Niue" }, new FiltPrefix { FiltPref = "P5", CountryName = "DPR of Korea" }, new FiltPrefix { FiltPref = "PY0S", CountryName = "St. Peter & St. " }, new FiltPrefix { FiltPref = "Z8", CountryName = "Republic of Sout" }, new FiltPrefix { FiltPref = "FT/t", CountryName = "Tromelin Island" } ); }
// add to configuration.cs ContestSeeds.SeedContest(context); public static void SeedContest(Logqso.mvc.DataModel.LogData.LogDataDB context) { context.Contest.AddOrUpdate( p => p.ContestId, new Contest { ContestId = "CQWWSSB1999", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 1999", StartDateTime = DateTime.Parse("10/30/1999 00:00:00"), EndDateTime = DateTime.Parse("10/31/1999 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2002", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2002", StartDateTime = DateTime.Parse("10/26/2002 00:00:00"), EndDateTime = DateTime.Parse("10/27/2002 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2002", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2002", StartDateTime = DateTime.Parse("11/23/2002 00:00:00"), EndDateTime = DateTime.Parse("11/24/2002 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2003", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW , ContestName = "Cqww Ssb 2003", StartDateTime = DateTime.Parse("10/25/2003 00:00:00"), EndDateTime = DateTime.Parse("10/26/2003 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2003", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2003", StartDateTime = DateTime.Parse("11/29/2003 00:00:00"), EndDateTime = DateTime.Parse("11/30/2003 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2004", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2004", StartDateTime = DateTime.Parse("10/30/2004 00:00:00"), EndDateTime = DateTime.Parse("10/31/2004 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2004", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2004", StartDateTime = DateTime.Parse("11/27/2004 00:00:00"), EndDateTime = DateTime.Parse("11/28/2004 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2005", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2005", StartDateTime = DateTime.Parse("10/29/2005 00:00:00"), EndDateTime = DateTime.Parse("10/30/2005 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2005", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2005", StartDateTime = DateTime.Parse("11/26/2005 00:00:00"), EndDateTime = DateTime.Parse("11/27/2005 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2006", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2006", StartDateTime = DateTime.Parse("10/28/2006 00:00:00"), EndDateTime = DateTime.Parse("10/29/2006 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2006", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2006", StartDateTime = DateTime.Parse("11/25/2006 00:00:00"), EndDateTime = DateTime.Parse("11/26/2006 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2007", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2007", StartDateTime = DateTime.Parse("10/27/2007 00:00:00"), EndDateTime = DateTime.Parse("10/28/2007 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2007", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2007", StartDateTime = DateTime.Parse("11/24/2007 00:00:00"), EndDateTime = DateTime.Parse("11/25/2007 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2008", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2008", StartDateTime = DateTime.Parse("10/25/2008 00:00:00"), EndDateTime = DateTime.Parse("10/26/2008 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2008", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2008", StartDateTime = DateTime.Parse("11/29/2008 00:00:00"), EndDateTime = DateTime.Parse("11/30/2008 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2009", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2009", StartDateTime = DateTime.Parse("10/24/2009 00:00:00"), EndDateTime = DateTime.Parse("10/25/2009 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2009", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2009", StartDateTime = DateTime.Parse("11/28/2009 00:00:00"), EndDateTime = DateTime.Parse("11/29/2009 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2010", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2010", StartDateTime = DateTime.Parse("10/30/2010 00:00:00"), EndDateTime = DateTime.Parse("10/31/2010 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2010", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2010", StartDateTime = DateTime.Parse("11/27/2010 00:00:00"), EndDateTime = DateTime.Parse("11/28/2010 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2011", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2011", StartDateTime = DateTime.Parse("10/29/2011 00:00:00"), EndDateTime = DateTime.Parse("10/30/2011 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2011", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2011", StartDateTime = DateTime.Parse("11/26/2011 00:00:00"), EndDateTime = DateTime.Parse("11/27/2011 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2012", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2012", StartDateTime = DateTime.Parse("10/27/2012 00:00:00"), EndDateTime = DateTime.Parse("10/28/2012 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2012", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2012", StartDateTime = DateTime.Parse("11/24/2012 00:00:00"), EndDateTime = DateTime.Parse("11/25/2012 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2013", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2013", StartDateTime = DateTime.Parse("10/26/2013 00:00:00"), EndDateTime = DateTime.Parse("10/27/2013 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2013", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2013", StartDateTime = DateTime.Parse("11/23/2013 00:00:00"), EndDateTime = DateTime.Parse("11/24/2013 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2014", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2014", StartDateTime = DateTime.Parse("10/25/2014 00:00:00"), EndDateTime = DateTime.Parse("10/26/2014 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2014", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2014", StartDateTime = DateTime.Parse("11/29/2014 00:00:00"), EndDateTime = DateTime.Parse("11/30/2014 11:59:59 PM") }, new Contest { ContestId = "CQWWSSB2015", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Ssb 2015", StartDateTime = DateTime.Parse("10/24/2015 00:00:00"), EndDateTime = DateTime.Parse("10/25/2015 11:59:59 PM") }, new Contest { ContestId = "CQWWCW2015", QsoModeTypeEnum = QsoModeTypeEnum.CW, ContestTypeEnum = ContestTypeEnum.CQWW, ContestName = "Cqww Cw 2015", StartDateTime = DateTime.Parse("11/28/2015 00:00:00"), EndDateTime = DateTime.Parse("11/29/2015 11:59:59 PM") }, //WPX new Contest { ContestId = "CQWPXSSB2001", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2001", StartDateTime = DateTime.Parse("03/24/2001 00:00:00"), EndDateTime = DateTime.Parse("03/25/2001 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2002", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2002", StartDateTime = DateTime.Parse("03/30/2002 00:00:00"), EndDateTime = DateTime.Parse("03/31/2002 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2003", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2003", StartDateTime = DateTime.Parse("03/29/2003 00:00:00"), EndDateTime = DateTime.Parse("03/30/2003 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2004", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2004", StartDateTime = DateTime.Parse("03/27/2004 00:00:00"), EndDateTime = DateTime.Parse("03/28/2004 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2005", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2005", StartDateTime = DateTime.Parse("03/26/2005 00:00:00"), EndDateTime = DateTime.Parse("03/27/2005 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2006", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2006", StartDateTime = DateTime.Parse("03/25/2006 00:00:00"), EndDateTime = DateTime.Parse("03/26/2006 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2007", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2007", StartDateTime = DateTime.Parse("03/24/2007 00:00:00"), EndDateTime = DateTime.Parse("03/25/2007 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2008", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2008", StartDateTime = DateTime.Parse("03/29/2008 00:00:00"), EndDateTime = DateTime.Parse("03/30/2008 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2009", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2009", StartDateTime = DateTime.Parse("03/28/2009 00:00:00"), EndDateTime = DateTime.Parse("03/29/2009 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2010", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2010", StartDateTime = DateTime.Parse("03/27/2010 00:00:00"), EndDateTime = DateTime.Parse("03/28/2010 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2011", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2011", StartDateTime = DateTime.Parse("03/26/2011 00:00:00"), EndDateTime = DateTime.Parse("03/27/2011 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2012", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2012", StartDateTime = DateTime.Parse("03/24/2012 00:00:00"), EndDateTime = DateTime.Parse("03/25/2012 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2013", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2013", StartDateTime = DateTime.Parse("03/30/2013 00:00:00"), EndDateTime = DateTime.Parse("03/31/2013 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2014", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2014", StartDateTime = DateTime.Parse("03/29/2014 00:00:00"), EndDateTime = DateTime.Parse("03/30/2014 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2015", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2015", StartDateTime = DateTime.Parse("03/28/2015 00:00:00"), EndDateTime = DateTime.Parse("03/29/2015 11:59:59 PM") }, new Contest { ContestId = "CQWPXSSB2016", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQWPX, ContestName = "Cqwpx Ssb 2016", StartDateTime = DateTime.Parse("03/26/2016 00:00:00"), EndDateTime = DateTime.Parse("03/27/2016 11:59:59 PM") }, //RUSDX new Contest { ContestId = "RUSDXC2005", QsoModeTypeEnum = QsoModeTypeEnum.MIXED, ContestTypeEnum = ContestTypeEnum.RUSDXC , Active = false, ContestName = "Russian DX 2005", StartDateTime = DateTime.Parse("03/19/2005 12:00:00"), EndDateTime = DateTime.Parse("03/20/2005 11:59:59 AM") }, //cq160 new Contest { ContestId = "CQ1602003", QsoModeTypeEnum = QsoModeTypeEnum.SSB, ContestTypeEnum = ContestTypeEnum.CQ160 , Active = false, ContestName = "Cq160 Ssb 2003 ", StartDateTime = DateTime.Parse("02/22/2003 00:00:00"), EndDateTime = DateTime.Parse("02/23/2003 11:59:59 PM" ) } ); }
public static void SeedCategory(Logqso.mvc.DataModel.LogControl.LogControlDB context) { //called by // CategorySeeds.SeedCategory( context) in LoalControlDB.cs context.CatOperator.AddOrUpdate( p => p.CatOprName, new CatOperator { CatOperatorEnum = CatOperatorEnum.ALL, CatOprName = Enum.GetName(typeof(CatOperatorEnum), CatOperatorEnum.ALL), Index = 1 }, new CatOperator { CatOperatorEnum = CatOperatorEnum.SINGLE_OP, CatOprName = Enum.GetName(typeof(CatOperatorEnum), CatOperatorEnum.SINGLE_OP).Replace('_', '-'), Index = 2 }, new CatOperator { CatOperatorEnum = CatOperatorEnum.MULTI_OP, CatOprName = Enum.GetName(typeof(CatOperatorEnum), CatOperatorEnum.MULTI_OP).Replace('_', '-'), Index = 3 }, // new CatOperator { CatOperatorEnum = CatOperatorEnum.SINGLE_OP_CLASSIC, CatOprName = Enum.GetName(typeof(CatOperatorEnum), CatOperatorEnum.SINGLE_OP_CLASSIC), Index = 4 }, //new CatOperator { CatOperatorEnum = CatOperatorEnum.SINGLE_OP_ROOKIE, CatOprName = Enum.GetName(typeof(CatOperatorEnum), CatOperatorEnum.SINGLE_OP_ROOKIE), Index = 5 }, new CatOperator { CatOperatorEnum = CatOperatorEnum.CHECKLOG, CatOprName = Enum.GetName(typeof(CatOperatorEnum), CatOperatorEnum.CHECKLOG), Index = 4 } ); context.CatBand.AddOrUpdate( p => p.CatBandName, new CatBand { CatBandEnum = CatBandEnum.ALL, CatBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum.ALL), Index = 1 }, new CatBand { CatBandEnum = CatBandEnum._160M, CatBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._160M).Replace("_", ""), Index = 2 }, new CatBand { CatBandEnum = CatBandEnum._80M, CatBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._80M).Replace("_", ""), Index = 3 }, new CatBand { CatBandEnum = CatBandEnum._40M, CatBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._40M).Replace("_", ""), Index = 4 }, new CatBand { CatBandEnum = CatBandEnum._20M, CatBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._20M).Replace("_", ""), Index = 5 }, new CatBand { CatBandEnum = CatBandEnum._15M, CatBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._15M).Replace("_", ""), Index = 6 }, new CatBand { CatBandEnum = CatBandEnum._10M, CatBandName = Enum.GetName(typeof(CatBandEnum), CatBandEnum._10M).Replace("_", ""), Index = 7 } ); context.CatPower.AddOrUpdate( p => p.CatPowerName, new CatPower { CatPowerEnum = CatPowerEnum.ALL, CatPowerName = Enum.GetName(typeof(CatPowerEnum), CatPowerEnum.ALL), Index = 1 }, new CatPower { CatPowerEnum = CatPowerEnum.HIGH, CatPowerName = Enum.GetName(typeof(CatPowerEnum), CatPowerEnum.HIGH), Index = 2 }, new CatPower { CatPowerEnum = CatPowerEnum.LOW, CatPowerName = Enum.GetName(typeof(CatPowerEnum), CatPowerEnum.LOW), Index = 3 }, new CatPower { CatPowerEnum = CatPowerEnum.QRP, CatPowerName = Enum.GetName(typeof(CatPowerEnum), CatPowerEnum.QRP), Index = 4 } ); context.CatAssisted.AddOrUpdate( p => p.CatAssistedName, new CatAssisted { CatAssistedEnum = CatAssistedEnum.ALL, CatAssistedName = Enum.GetName(typeof(CatAssistedEnum), CatAssistedEnum.ALL), Index = 1 }, new CatAssisted { CatAssistedEnum = CatAssistedEnum.ASSISTED, CatAssistedName = Enum.GetName(typeof(CatAssistedEnum), CatAssistedEnum.ASSISTED), Index = 2 }, new CatAssisted { CatAssistedEnum = CatAssistedEnum.NON_ASSISTED, CatAssistedName = Enum.GetName(typeof(CatAssistedEnum), CatAssistedEnum.NON_ASSISTED).Replace('_', '-'), Index = 3 } ); context.CatNoOfTx.AddOrUpdate( p => p.CatNoOfTxEnum, new CatNoOfTx { CatNoOfTxEnum = CatNoOfTxEnum.ALL, CatNoOfTxName = Enum.GetName(typeof(CatNoOfTxEnum), CatNoOfTxEnum.ALL), Index = 1 }, new CatNoOfTx { CatNoOfTxEnum = CatNoOfTxEnum.ONE, CatNoOfTxName = Enum.GetName(typeof(CatNoOfTxEnum), CatNoOfTxEnum.ONE), Index = 2 }, new CatNoOfTx { CatNoOfTxEnum = CatNoOfTxEnum.TWO, CatNoOfTxName = Enum.GetName(typeof(CatNoOfTxEnum), CatNoOfTxEnum.TWO), Index = 3 }, new CatNoOfTx { CatNoOfTxEnum = CatNoOfTxEnum.UNLIMITED, CatNoOfTxName = Enum.GetName(typeof(CatNoOfTxEnum), CatNoOfTxEnum.UNLIMITED), Index = 4 } ); //alternate methid //var courses = new List<Course> //{ // new Course {CourseID = 1050, Title = "Chemistry", Credits = 3, }, // new Course {CourseID = 4022, Title = "Microeconomics", Credits = 3, }, // new Course {CourseID = 4041, Title = "Macroeconomics", Credits = 3, }, // new Course {CourseID = 1045, Title = "Calculus", Credits = 4, }, // new Course {CourseID = 3141, Title = "Trigonometry", Credits = 4, }, // new Course {CourseID = 2021, Title = "Composition", Credits = 3, }, // new Course {CourseID = 2042, Title = "Literature", Credits = 4, } //}; //courses.ForEach(s => context.Courses.AddOrUpdate(p => p.Title, s)); }