public List <ErrorMessage> GetAllErrorMessage() { CDS20AzureSQL dbEntity = new CDS20AzureSQL(); var L2Enty = from c in dbEntity.ErrorMessage.AsNoTracking() select c; return(L2Enty.ToList <ErrorMessage>()); }
public EventRuleCatalog GetById(int Id) { CDS20AzureSQL dbEntity = new CDS20AzureSQL(); var L2Enty = from c in dbEntity.EventRuleCatalog.AsNoTracking() where c.Id == Id select c; return(L2Enty.FirstOrDefault()); }
public Company GetById(int Id) { CDS20AzureSQL dbEntity = new CDS20AzureSQL(); var L2Enty = from c in dbEntity.Company.AsNoTracking() where c.Id == Id select c; return(L2Enty.FirstOrDefault()); }
public OperationTask GetByid(int Id) { CDS20AzureSQL dbEntity = new CDS20AzureSQL(); var L2Enty = from c in dbEntity.OperationTask.AsNoTracking() where c.Id == Id && c.DeletedFlag == false select c; return(L2Enty.FirstOrDefault()); }
public List <MessageCatalog> GetAllMasterByCompanyId(int companyId) { CDS20AzureSQL dbEntity = new CDS20AzureSQL(); var L2Enty = from c in dbEntity.MessageCatalog.AsNoTracking() where c.CompanyID == companyId && c.ChildMessageFlag == false select c; return(L2Enty.ToList <MessageCatalog>()); }
public List <Application> GetActionApplicationById(int Id) { CDS20AzureSQL dbEntity = new CDS20AzureSQL(); var appList = from eventAction in dbEntity.EventInAction join app in dbEntity.Application on eventAction.ApplicationId equals app.Id where eventAction.EventRuleCatalogId == Id select app; return(appList.ToList <Application>()); }
public CompanyInSubscriptionPlan GetActiveSubscriptionPlanByCompanyId(int Id) { CDS20AzureSQL dbEntity = new CDS20AzureSQL(); DateTime DTNow = DateTime.UtcNow; var L2Enty = from c in dbEntity.CompanyInSubscriptionPlan where c.CompanyID == Id && DTNow >= c.StartDate && c.ExpiredDate >= DTNow select c; return(L2Enty.FirstOrDefault()); }
public void Update(OperationTask operationTask) { CDS20AzureSQL dbEntity = new CDS20AzureSQL(); operationTask.UpdatedAt = DateTime.Parse(DateTime.UtcNow.ToString()); dbEntity.OperationTask.Attach(operationTask); dbEntity.Entry(operationTask).State = System.Data.Entity.EntityState.Modified; dbEntity.SaveChanges(); }
public List <MessageElement> GetElementsById(int Id) { CDS20AzureSQL dbEntity = new CDS20AzureSQL(); var L2Enty = from element in dbEntity.MessageElement.AsNoTracking() join catalog in dbEntity.MessageCatalog.AsNoTracking() on element.MessageCatalogID equals catalog.Id where catalog.Id == Id && element.MessageCatalogID == Id select element; return(L2Enty.ToList <MessageElement>()); }
private static void loadSystemConfig() { if (cdsConfig.Count == 0) { CDS20AzureSQL dbEntity = new CDS20AzureSQL(); var L2Enty = from c in dbEntity.SystemConfiguration select c; var cdsConfigList = L2Enty.ToList <SystemConfiguration>(); if (cdsConfigList != null) { foreach (var c in cdsConfigList) { cdsConfig.Add(c.Key, c.Value); } } } }