2009年8月20日 星期四

解決在 windows 64bit 版本下無法使用OWC

1. 修改應用程式集區設定,將啟用32位元應用程式設為true
2. 開啟 C:\Windows\System32\inetsrv\config\applicationHost.config 找到 add name="PasswordExpiryModule" image="C:\Windows\system32\RpcProxy\RpcProxy.dll" 並修改為 add name="PasswordExpiryModule" image="C:\Windows\system32\RpcProxy\RpcProxy.dll" preCondition="bitness64"

Entity Framework 建立新物件並儲存後馬上取得關聯資料

使用 CreateProxy 建立物件,不要直接 new var newmodel = _contextXXX.CreateProxy<yyy>(); ... _contextXXX.yyy.Add(newmodel); await _contextXXX.SaveC...