On a asp.net project I'm using generated classes to access the\ndatabase. I'm developing business logic classes to handle all business\nlogic and pass on info to the data access classes. On the code behind\npages of the asp.net pages I simply get the values from the postback\nand set the properties of the business classes. Before I pass the\nvalues on the the data access layer to persist the changes I'd like to\ncheck if the required properties have been set correctly.\n\nI'm unsure how best to implement these kinds of checks. Should I\nsimply add a function to the business layer class called something\nlike:\n\nfunction isReadyToPersist() as boolean\n\nand do my checks here? Something like:\n\nif me.PersonId = 0 then\nreturn false\nend if\n\netc.\n\nor is there a better way?