Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Membership Provider Question

Status
Not open for further replies.

modika11

Programmer
Jan 31, 2008
20
Hi All,

I am in deperate need of some help. I have implemented my own extended membership provider so that i can have some more additional values stored with my user information. That is fine, and if i have to call my custom membership provider i do it through code. But for a neater solution i want to use the Object DataSource and wrap the calls around that. I was thinking of creating a wrapper class for my provider to allow me to (a) instantiate all the items i need and call the itialize method from the constructor and (b) have wrapper methods to call down into my provider class which will be a more re-usable approach.

I was wondering if anyone had any thoughts on this and if they had any experience implementing something similar.

Thanks,

Rob
 
But for a neater solution i want to use the Object DataSource and wrap the calls around that.
personally I find code to be much more elegant than markup:) plus you can easily unit test code. mark up usually required manual testing and break points... but i digress.

the objectdatasource is an adapter object. it adapts your datasource (in this case the customer membership provider) and allows objects to bind to it.

all in all it sounds like your idea is solid. Not sure why exactly you would need wrapper/decorator/adapter from the customer membership provider to obect which interacts with the object datasource. but if it's needed, then go for it.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Hi Jason,

Thanks for the response. i might just do it through code as i generally prefer that too. The reason for the wrapper is just when i use my custom membership provider i have to create code to force the intialize method (cant use the default memebership class as it does not expose my custom methods) so i just wanted to neaten it up a little by providign a simple wrapper that creates and runs the intialize method and does the relevant membership setup on its constructor, that way i dont have duplicate code flying around all over the place.

Sometimes .Net gets on my wick with the amount of choices you have :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top