private List <DataPointDefinition> GetDataPointDefinitions(int cpeDefId) { var cpe_DevEntities = new cpe_devEntities(); var dataset = from dataPoint in cpe_DevEntities.DataPointDefinitions where dataPoint.CpeDefinitionId == cpeDefId select dataPoint; return(dataset.ToList()); }
public Boolean Insert(List <CpeEntryDataPointValue> cpeEntryDataPointValues) { bool success = true; cpe_devEntities db = new cpe_devEntities(); foreach (var cpeEntryDataPintValue in cpeEntryDataPointValues) { db.CpeEntryDataPointValues.Add(cpeEntryDataPintValue); } try { db.SaveChanges(); } catch (Exception e) { success = false; } return(success); }