views:

158

answers:

1

I'm using the membership and role provider code from the Microsoft SQLProvider and SQLRoleProvider samples, and I'm getting a little overwhelmed with exactly how I can integrate my own schema into the source.

The GetAllUsers method, for example, loads data from specific tables in the ASP.NET database and puts them into a very specific data structure. My tables look nothing like that.

Do I have to adapt my tables to includes those fields, or can I substitute with my own structure?

In other words, how closely must I conform to the interfaces of the procs that the SQL Provider implements? Those procs all have a pagesize and pagenumber parm, too.

A: 

The returns on the provider must be the same, what you actually do in the database doesn't matter, the key is that the outward behavior must be the same.

I strongly recommend implementing the SQL Paging solutions as they do as well, as it makes for code that will be able to handle larger loads.

Mitchel Sellers
I see that it internally creates a User object; I imagine that my database schema must also contain the fields specified in that object?
Caveatrob
Yes and no...if you are building a custom application that doesn't need the items, you don't need to persist the data, as you will not be providing it. If you are creating a generic provider, then yes.
Mitchel Sellers