I am submitting the answer I found so it could help whoever faced the same problem. in the Customer class need to add 2 lines for each property has a relation with this Customer class like Marital Status where we should get the list from the MaritalStatus table and save the selected value only in the Customer table:
<DefaultSettingValue("0")>
Public Property MaritalStatusID() As Integer?
Public Overridable Property MaritalStatus() As MaritalStatusClassTable ' This will generate a FK in the Customer table and populate the relationship.
<DefaultSettingValue("0")>
Public Property Addr_AreaID() As Integer?
Public Overridable Property AreaList() As AreaListClassTable
<DefaultSettingValue("0")>
Public Property Wrk_OccupationID() As Integer?
Public Overridable Property Occupation() As OccupationClassTable
Then in the Customer FormView (if you are using FormView) you need only to define a SelectMethod function where it should return IEnumerable(Of xxxx) list of data from its master table. Note: I think the ID property which was created in the Customer class (Addr_AreaID(), MaritalStatusID(), Wrk_OccupationID()) should be the same ID of the PK in its master table. HTH.
I've done the following, created a model & then a function to be able to use it around my app:
Public Function GetErrorList(ByVal modelState As ModelStateDictionary) As String
Dim errorList = ( _
From item In modelState _
Where item.Value.Errors.Any() _
Select item.Value.Errors(0).ErrorMessage).ToList()
Return "Error in Rec. {0}: " & errorList.Item(0).ToString
End Function
Then I call the function:
TryUpdateModel(Customer)
If Not ModelState.IsValid Then
ModelState.AddModelError("ModelError", String.Format(GetErrorList(ModelState), id))
Return 0
End If
use SQL, preferably oracle. and if oracle, preferably java. it sounds like very data-centric app, like bank. also revise your expectation, you can do a rapid development and expect automagicaly to be fast and secure :)