I have an entity model that represents a custom security data store.
I have used the NakedObjects T4 template to generate my POCO classes from this model.
I am now in the process of writing a custom ASP.Net Membership provider that needs to read and write data from the model, so I thought great, I can create a new derived abstractservice that uses the nakedobjects framwork to access the model and call this
from my new custom membership provider, rather than using Entity Framework directly.
In doing so, I have found the following:
1. I can query instances in my membership provider using Container.Instances<T> and correctly get the data from the db.
2. If I try and programmatically create a new instance or update or delete an existing instance from my membership provider, then the db does not get updated.
3. If I call the same code via an action from the UI then the updates and deletes work.
Am I missing something really obvious? If so, what?
If not, is it possible to achieve updates and deletes completely programmatically? If it is, how do I do this?