Doubt about entities asp.net mvc

1

I have 4 tables: T1 , T2 , T3 and T4 and the Customers table .

What happens is that the tables T2 to T4 should "be one. But as part of the data would be like a table and its options, I preferred to break for easier maintenance ...

It would be like this, referring to data as if it were a table:

  

| Type | Schedule | Quantity |

     

| A | 12:00 | 4 |

So I preferred to put in different tables to facilitate ....

But now I do not know how to save this in the database ... Well, I have to register everything at the same time. That is, it would be a form of cascade: after registering the client, it was related in T2 . After the T2 has been registered, relate it to the others ( T3 and T4 ) ...

How could I do this using the Entity Framework ? How could I do it, since I do not need to generate a controller and views (could be partial views) for this? Is my approach correct or should I do everything in one table?

I hope I have been clear.

    
asked by anonymous 26.05.2016 / 21:45

1 answer

0

try using the link below to see if it helps with your issue

Fluent API and Migration

    
26.05.2016 / 22:38