Some minor changes
Use massive instead EF

Deleted EF dependency, use Massive instead
Better foreign Key recognition
Add validation

Add validation.
Client side should works well, but in server side it could be some
problem.