// Private Helper Methods private static CYCLES OpenConnection(IDbConnection connection, string library) { var dOOdad = new CYCLES(connection); dOOdad.SchemaGlobal = library + "."; return(dOOdad); }
protected CycleModel ConvertCycleToCycleModel(CYCLES CYCLE) { return(new CycleModel { CycleId = CYCLE.CYCLE_ID, StartDate = CYCLE.START_DATE.Value, EndDate = CYCLE.END_DATE.Value }); }
public long CreateCycle(DateTime startDate, DateTime endDate) { try { using (var context = new GritCoinEntities()) { var cycle = new CYCLES { CYCLE_ID = GetSequenceNextValue(context, "GRITCOIN.CYCLES_SEQ"), START_DATE = startDate, END_DATE = endDate }; context.AddToCYCLES(cycle); context.SaveChanges(); return(cycle.CYCLE_ID); } } catch { throw; } }
public CyclesLookup(IDbConnection connection, string library) { _dOOdad = OpenConnection(connection, library); }