有時間再來整理,stack overflow上有人有寫出用強型別取得的方法
標籤
ASP.NET MVC
(29)
Visual C#
(15)
JQuery
(10)
Plugins
(8)
JQuery Plugins
(6)
JavaScript
(6)
MySQL
(5)
CSS
(4)
LinQ
(4)
Mac OS
(4)
CentOS
(3)
Design Pattern
(3)
Entity Framework
(3)
IIS
(3)
Python
(3)
Windows
(3)
php
(3)
Docker
(2)
LAMP
(2)
SQL Server
(2)
WCF
(2)
.NET
(1)
.NET Core
(1)
AWS
(1)
Browser
(1)
GIS
(1)
IE
(1)
Internet Security
(1)
Linux
(1)
Platform
(1)
React
(1)
SEO
(1)
Testing
(1)
VMware
(1)
Windows 7
(1)
cookie
(1)
curl
(1)
laravel
(1)
phpBB
(1)
session
(1)
中古屋
(1)
透天
(1)
閒言閒語
(1)
面試
(1)
鳥松
(1)
2011年10月16日 星期日
2011年9月29日 星期四
[LinQ] 確定LinQ的預設值(FirstOrDefault DefaultIfEmpty)
var result = (...).FirstOrDefault();
if( result != null )
{
...
}
如果用下面的方法就簡單多了:
var defaultValue = default(List);
if( result != defaultValue )
{
...
}
2011年9月19日 星期一
[Entity Framework] 發生 錯誤0019: EntityContainer名稱必須唯一
錯誤訊息: 錯誤0019: EntityContainer名稱必須唯一
error 0019: The EntityContainer name must be unique
--
因為將有包含Model的類別全數移動到另一個ClassLiberary專案,結果運行的時候發生上述錯誤,上網查找後,有可能的原因為:
1. 參考的不同命名空間中有兩個名稱相同的EntityContainer(*.edmx)。
2. 將專案bin目錄中所有dll與pdb完全清除,並且重新編譯。
Reference:
訂閱:
文章 (Atom)