LINQ to SQL only supports 1 to 1 mapping of database tables, views, sprocs and functions available in Microsoft SQL Server. It's a great API to use for quick data access construction to relatively well designed SQL Server databases. LINQ2SQL was first released with C# 3.0 and .Net Framework 3.5.
LINQ to Entities (ADO.Net Entity Framework) is an ORM (Object Relational Mapper) API which allows for a broad definition of object domain models and their relationships to many different ADO.Net data providers. As such, you can mix and match a number of different database vendors, application servers or protocols to design an aggregated mash-up of objects which are constructed from a variety of tables, sources, services, etc. ADO.Net Framework was released with the .Net Framework 3.5 SP1.
This is a good introductory article on MSDN:
Introducing LINQ to Relational Data
1) If the entity model is within the same project as the DomainServices:
In order to get this to work you need to create a new file with the extension
.shared.cs (or vb).
This extension tells RIA Services to copy the file to the client side.
Within the file you can extend the entity (using partial) and add the
new property.
Don't forget to call "this.RaisePropertyChanged("SingularAmount")" so
that any control bound to this property will get notification of the change.
Because you are using partial classes, and the way RIA shared code works, the
new file has to be within the same project/assembly as the original entity.
...
2) If the entity model is in a different project:
Create a partial class in the client side project with the new property.
Same concept as above but new property will only be visible in the client side.
...
You can find more information on sharing code on the overview document
here. Page 34.
Chapter 3 is about client side code generation. Good info to know.
Also, chapter 12 (page 97-103) on how to share code accross tiers, chapter 17
(pages 122-125) Code generation hook points, and chapter 18 (pages 126-128) How to add
how to add computed properties.
If you are serious on using .NET RIA Services, you probably should know this
document by heart. :-)
Best Answer
Well when you say you changed the name of a navigation property, do mean you changed it in the EF model Designer / EDMX file? Or just in the CLR?
You need to change it in both places.
Hope it is just this simple,
Alex James