public DiscoveryRepository(IInnonAnalyticsEngineEntities db, IConnectorRepository conectorrepository, IRawTableRepository rawtablename, IElementRepository elementrepository) { _dbcontext = db; _objConectorRepository = conectorrepository; _objRawTableName = rawtablename; _objElementRepository = elementrepository; }
public ElementDTO UpdateElement(ElementDTO elementDto) { if (elementDto == null) { throw new ElementException(Resources.ElementPointNotFound); } tblElement element = _dbcontext.tblElements.SingleOrDefault(e => e.ID == elementDto.ID); if (element != null) { try { ElementDTO.ConvertDTOToTable(elementDto, ref element); _dbcontext.SaveChanges(); //Refresh dbcontext _dbcontext = new InnonAnalyticsEngineEntities(); element = _dbcontext.tblElements.SingleOrDefault(e => e.ID == elementDto.ID); element.tblTagElements = element.tblTagElements.Where(d => d.Is_Deleted == false).ToList(); return(ElementDTO.ConvertTableToDTO(element)); } catch (Exception ex) { throw ex; } } else { throw new ElementException(Resources.ElementPointNotFound); } }
public IList <Dashboard_Menu_DTO> Get_Dashboard_Menu_ByID(int?menuID) { _dbcontext = new InnonAnalyticsEngineEntities(); IList <tblDashboard> tbl_dashboards = (from e in _dbcontext.tblDashboards where (menuID.HasValue ? e.Parent_Id == menuID : e.Parent_Id == null) && e.Is_Deleted == false orderby e.Title select e).ToList(); return(Dashboard_Menu_DTO_Converter.Dashboard_Menu_DTO_Converter_list_Table_To_DTO(tbl_dashboards)); }
public MetricRepository(IInnonAnalyticsEngineEntities db, ITagRepository tagRespository) { _dbcontext = db; _tagRespository = tagRespository; if (_pre_define_matric == null) { _pre_define_matric = Get_Pre_Define_Metrics(); } }
public static void InitializeUnit() { if (context == null) { context = new InnonAnalyticsEngineEntities(); } if (Unit_Of_Measurement_DTO.Unit_DTO == null) { Unit_Of_Measurement_DTO.Unit_DTO = GetAllActiveUnits(); } }
//In Global.asx it will initailize, If want to reinitailze please restart the application pool and run the application public static void InitializeLangugae() { if (context == null) { context = new InnonAnalyticsEngineEntities(); } objLangugaeValueDTO = LanguageValueDTOConvert.ConvertTableToDTO(getAllActiveLanguage()); LanguageValueDTOConvert.listLanguageValueDTO = objLangugaeValueDTO; if (objLangugaeValueDTO.Count() == 0) { throw new LanguageException(Resources.LanguageNotFound); } }
public IList <Dashboard_Menu_DTO> Get_Dashboard_Menu_ByID_ByUserId(int?menuID, string user_ID) { _dbcontext = new InnonAnalyticsEngineEntities(); IList <tblDashboard> tbl_dashboards = _dbcontext.AspNetUserDashboards.Where(userdashboard => userdashboard.User_Id == user_ID) .Select(dashboard => dashboard.tblDashboard).ToList(); tbl_dashboards = (from e in tbl_dashboards where (menuID.HasValue ? e.Parent_Id == menuID : e.Parent_Id == null) && e.Is_Deleted == false orderby e.Title select e).ToList(); return(Dashboard_Menu_DTO_Converter.Dashboard_Menu_DTO_Converter_list_Table_To_DTO(tbl_dashboards)); }
public DatawareHouseMigrationLogRepository(IInnonAnalyticsEngineEntities db) { _dbcontext = db; }
//static LanguageRepository() //{ // getAllActiveLanguage(); //} public UnitRepository(IInnonAnalyticsEngineEntities db) { context = db; }
public HomePageWidgetRepository(IInnonAnalyticsEngineEntities db, IDashboardRepository dashboadRepository) { _dbcontext = db; _dashboadRepository = dashboadRepository; }
public DashboardRepository(IInnonAnalyticsEngineEntities db, IMetricRepository metric_rep) { _dbcontext = db; _metric_rep = metric_rep; }
public NoteRepository(IInnonAnalyticsEngineEntities _db) { _dbcontext = _db; }
public RawTableRepository(IInnonAnalyticsEngineEntities db) { _dbcontext = db; }
public TagElementRepository(IInnonAnalyticsEngineEntities dbcontext) { _dbcontext = dbcontext; }
public DashboardRepository(IInnonAnalyticsEngineEntities db) { _dbcontext = db; }
//static LanguageRepository() //{ // getAllActiveLanguage(); //} public LanguageRepository(IInnonAnalyticsEngineEntities db) { context = db; }
public ConnectorRepository(IInnonAnalyticsEngineEntities db) { _dbcontext = db; }
public ElementRepository(IInnonAnalyticsEngineEntities db, IMetricRepository metricRepository, IConnectorRepository connector_rep) { _dbcontext = db; _metricRepository = metricRepository; _connector_rep = connector_rep; }