Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > BOOK: Silverlight 4 Problem - Design - Solution
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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..
 
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.
 
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
 
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.





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





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