Ok, I just hit the wrong button.. lets resume my post.
Hello,
I've just started with DevForce and have a question about modelling my entities.
I'm not sure where EF ends and DF begins, so this may be an EF question.
I have a classic 'directory-file' situation
On one side the directory tree and on the other the containing files
I'm using one table to store these instances.
DataTable
- ID Int
- Name Varchar
- IsFile Bit
- Parent_ID Int
DirectoryEntity
- ID Int
- Name String
- Parent DirectoryEntity
- Childs Collection of DirectoryEntiry
- Files Collection of FileEntity
FileEntity
- ID Int
- Name String
- Parent DirectoryEntity
Questions:
1. What is the best way to implement this?
2. How do I hide 'IsFile', but, implement it's value in the correct entity class?
3. EF, by default, makes FK fields public, like 'Parent_ID'. Can I freely set it getter and setter to private?
Thank in advance.
Peter