Frank,
>I have changed a varchar column to a smallint identity column, regenerated using the Business Layer Generator, but when I run my application I get this error:
>
>Column 'AgentNumber' is read only.
It looks as if you are trying to save a value to an identity column, which is illegal because it's readonly.
The BLG doesn't make the property read-only because it is matching what the Entity Framework does for entities--it creates both a get() and set() for identity columns. This is because both the Entity Framework entities and MM .NET entities can work with databases other than SQL Server, and some of those databases do allow you to change the identity column value.
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com