One To One association won't compile

One To One association won't compile

Postby jonsidnell » Tue 25 May 2010 09:54

Hi

I have the following schema in my database:

Image

Which I have mapped to LinqToSQL classes using EntityDeveloper as follows:

Image

The association between User and NewsletterOption is a one-to-one association, with the following properties:

Image

I cannot now build this solution as doing so produces the following set of errors:

1. 'Models.NewsletterOption' does not contain a definition for 'Remove' and no extension method 'Remove' accepting a first argument of type 'Models.NewsletterOption' could be found (are you missing a using directive or an assembly reference?)

2. 'Models.NewsletterOption' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'Models.NewsletterOption' could be found (are you missing a using directive or an assembly reference?)

3. 'Models.User' does not contain a definition for 'Remove' and no extension method 'Remove' accepting a first argument of type 'Models.User' could be found (are you missing a using directive or an assembly reference?)

4. 'Models.User' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'Models.User' could be found (are you missing a using directive or an assembly reference?)


If I specify it as a one-to-many association, it compiles fine, but this really is a One-To-One association, and don't want to have to fudge it as a OneToMany.

Any ideas where I'm going wrong?

Thanks
Jon
jonsidnell
 
Posts: 5
Joined: Mon 14 Dec 2009 12:06

Postby AndreyR » Tue 25 May 2010 11:46

Could you please upgrade to the latest build of the product you are using?
We have already fixed this problem several builds ago.
Please let us know if the problem persists.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby jonsidnell » Tue 25 May 2010 12:10

Hi

I've just installed v. 5.50.79 of dotConnect for MySql and the problem is still occurring.

Is there a newer version I should have got?

Thanks
Jon
jonsidnell
 
Posts: 5
Joined: Mon 14 Dec 2009 12:06

Postby jonsidnell » Tue 25 May 2010 12:19

I've just ransacked my emails to see that there is a much newer version I can get under the annual subscription I have.

I'll grab that and see how it goes.
jonsidnell
 
Posts: 5
Joined: Mon 14 Dec 2009 12:06


Return to LinqConnect (LINQ to SQL support)