mvc2 validation problem (ambiguous reference between model and models)
Posted
by ile
on Stack Overflow
See other posts from Stack Overflow
or by ile
Published on 2010-03-29T13:36:53Z
Indexed on
2010/03/29
13:43 UTC
Read the original article
Hit count: 386
I followed instructions for mvc validation but I can't manage to solve this problem....
This is linq to sql model:
I set Entity namespace to be CMS.Model
If I try to declare partial class Article in Portal.Models namespace:
public partial class Article
{
....
}
Then, after using Article article
somewhere in code I get following error:
'Article' is an ambiguous reference between 'Portal.Models.Article' and 'CMS.Model.Article'
Portal is project name and CMS is area.... I followed these instructions I aslo created NerdDinner from scratch and in that example validation works. I can't figure out what am I doing wrong... someone noticed my mistake? Is it related with giving name to Entity namespace (in tutorial they used default one)
Thanks in advance!
PS I'd like to note that I'm c# newbie so I'm not really familiar with these partial classes
© Stack Overflow or respective owner