F
Frijoles
I'm working against an Oracle database, trying to implement a custom profile
provider. I have the membership and roles providers working, and in fact I
can get the profile provider to work as well. I'm wondering, however, how
this works logically.
It seems that when I add an new property to my web.config file, it picks
that up correctly in the application. However, unless I implement that in the
profile provider, it will not work. It seems a bit useless, then, that for
every property in the web.config section, I have to set up multiple functions
(get/set) for that property to work correctly. The end result is a lot of
extra code. I can't see a way to do a mass-update of all the data at one time.
Also, the custom provider from the MSDN website actually deletes the data
from profiledata table, and then does an insert to put the data back. The
result of the default code, then, is that:
Profile.FirstName = "bob";
Profile.LastName = "marley";
Profile.Save();
This results in only 'marley' being saved. Bob is lost due to the deletion.
I've modified the code to update instead of delete, but I still have the
problem above.. for every new field I add, I have to modify my provider to
handle it. Surely there is a better way to what I am doing? I'd hate to have
to hit the database dozens of times whenever I want to update a user's record.
Aaron
provider. I have the membership and roles providers working, and in fact I
can get the profile provider to work as well. I'm wondering, however, how
this works logically.
It seems that when I add an new property to my web.config file, it picks
that up correctly in the application. However, unless I implement that in the
profile provider, it will not work. It seems a bit useless, then, that for
every property in the web.config section, I have to set up multiple functions
(get/set) for that property to work correctly. The end result is a lot of
extra code. I can't see a way to do a mass-update of all the data at one time.
Also, the custom provider from the MSDN website actually deletes the data
from profiledata table, and then does an insert to put the data back. The
result of the default code, then, is that:
Profile.FirstName = "bob";
Profile.LastName = "marley";
Profile.Save();
This results in only 'marley' being saved. Bob is lost due to the deletion.
I've modified the code to update instead of delete, but I still have the
problem above.. for every new field I add, I have to modify my provider to
handle it. Surely there is a better way to what I am doing? I'd hate to have
to hit the database dozens of times whenever I want to update a user's record.
Aaron