For example, instead of writing
public DocumentEntity CreateDocument ( int documentTypeId) { DocumentEntity document = new DocumentEntity (); document.DocumentTypeId = documentTypeId; return document; }
use
public DocumentEntity CreateDocument ( DocumentType documentType) { DocumentEntity document = new DocumentEntity (); document.DocumentTypeId = (int)documentType; return document; }
This holds for data accessors, remoting objects, etc.
No comments:
Post a Comment