In order to add new threads or reply to existing posts, you have to be logged-in. If you are not registered yet, you need to register first, and then login with your personal credentials.
Can I change generated BO Id from Guid to Int type? My DB table primary key is identity of int.
There are two automatically generated properties in every BusinessObject: nameID and LastModified. The Id is of System.Guid and there is no easy way to change its type.
Personally, I would always prefer Guid to int as a primary key, but if there is a majority out there using ints, we surely will reconsider our design decision.
There are quite some disadvantages using ints as primary keys. The main reason for us to use guids are references. Using ints you only have two choices to determine new ids: let the database create an id (identity) or use a service to get a unique one. The prior is critical when creating a new BusinessObject that references other BusinessObjects by id, because you simply cannot refer to a BO that has no id. The second option forces you to provide a services that needs to handle concurrent access properly.
What do you suggest to manage this? How would you have the CslaFactory to be like to match your needs?
It could be this solution: Generating temporary unique ID values for objects