Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > BOOK: Silverlight 4 Problem - Design - Solution
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Silverlight 4 Problem - Design - Solution
This is the forum to discuss the Wrox book Silverlight 4 Problem - Design - Solution by Nick Lecrenski; ISBN: 9780470534045
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Silverlight 4 Problem - Design - Solution section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 7th, 2010, 03:49 AM
Authorized User
 
Join Date: Sep 2009
Posts: 34
Thanks: 4
Thanked 1 Time in 1 Post
Default How to convert Linq2SQL to Entity Framework?

Did anybody convert this solution to use Entity Framework instead of Linq2SQL?

It seems Microsoft merely supports Linq2SQL (only bug fixes), and because of the growing and widening functionality of the EF, it worths the conversion.

The first difficulty is in the custom membership provider.

In all GetUser... methods we have to return the MembershipUser for the Asp.net Authentication Service, but we want ot use the UserInformation object in our solution, to store them in the Globals.currentUser and use them in the UserRegistration and AccountSettings pages.

In Linq2SQL it's easy to circumvent this difficuly, because we can inherit UserInformation from MembershipUser, as we did in UserInformationMetadata.cs class.

In EF however all objects are inherited from the EntityObject, so we can't inherit from two base classes.

Maybe the solution is to extract Interface from the membershipUser and apply it to UserInformation? Did anybody solve this issue?

Any help will be greatly appreciated,

Gabor

Last edited by Gabor66; November 7th, 2010 at 04:02 AM..
Reply With Quote
  #2 (permalink)  
Old November 9th, 2010, 05:40 AM
Registered User
 
Join Date: Nov 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Entity Framework

Yes I'm having this problem to as like you say the UserInformation class cannot inherit MembershipUser as it already inherits from EntityObject.
Im currently creating my own user class and will ditch the metadata class but the price of this is losing the neat validation provided by attributes.
I will let you know how this goes. I do think its a good idea to ditch LinqToSQL though due to MS basically giving up on it.
Reply With Quote
  #3 (permalink)  
Old November 18th, 2010, 03:43 AM
Authorized User
 
Join Date: Sep 2009
Posts: 34
Thanks: 4
Thanked 1 Time in 1 Post
Default

If You create a new User class, You can attach attrubutes to them, or create metadata class manually.

If You give up with the UserInforation class like in the book's code, You also lost the possibility to build a usercontrol based on dataform very easy, with validation and localization possibilities, and use them on Registration and AccountSettings pages, wich save you from many manual coding.

I'm waiting for Your solution inpatiently

Gabor
Reply With Quote
  #4 (permalink)  
Old May 30th, 2011, 07:32 AM
Registered User
 
Join Date: May 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Any progress on this?

Has anyone been able to resolve this?

The book has some great ideas but it seems to me that Entity Framework support is a must for serious RIA Services LOB app development.

I can figure out how to manipulate custom providers without using EF but I really like the way the book integrates them with Linq2SQL and it would be great if we could do it with EF.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entity Framework And MVC geomar BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 5 January 24th, 2011 04:58 PM
Entity Framework vs datasets? hoss BOOK: Beginning ASP.NET 4 : in C# and VB 1 September 30th, 2010 02:42 AM
Switching To entity framework luckystar BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 0 July 31st, 2009 09:52 PM
The BeerHouse and Entity Framework docluv BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 October 3rd, 2008 01:32 PM



All times are GMT -4. The time now is 09:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.