0
不知道社區中是否有人有機會在Inmemory數據庫(明亮星)上工作,我試圖通過下面的代碼更新記錄,但無法這樣做。無法更新brightstar數據庫中的記錄
public void ChangePrice(string strId)
{
string configTDDB = ConfigurationManager.AppSettings["TDSDB"];
double Price = 10.10;
IMDB.IMDBEntityContext TDcontext = new IMDB.IMDBEntityContext(configTDDB);
var claim = bdcontext.Price_Lists.FirstOrDefault<TDParser.IMDB.IPrice_List>(m => m.NDC == strId);
claim.Price = Price;
TDContext.SaveChanges();
}
對此的任何建議/幫助將有很大的幫助。
他們是否有文件/工作樣本,我會從那開始的。 – 2013-03-25 14:26:52
http://www.brightstardb.com/documentation/Developing_With_BrightstarDB2.html#Basics – 2013-03-25 14:30:19
難道這只是因爲你將上下文命名爲'bdcontext',然後再調用'TDContext.SaveChanges()'。這意味着你正在一個環境中進行修改,然後再保存另一個? – 2013-03-25 14:33:39