public bool SavedataSet(Models.PythagorasValue pythagorasValue) { using (DB1Entities1 db = new DB1Entities1()) { db.PythagorasValues.Add(pythagorasValue); db.SaveChanges(); } return(true); }
public void logError(ErrorLog message) { try { using (DB1Entities1 db = new DB1Entities1()) { db.ErrorLogs.Add(message); db.SaveChanges(); } } catch (Exception ex) { throw new FaultException(ex.Message, new FaultCode("02 Data-fault")); } }