Doubt about entities Asp.net mvc

Asked

Viewed 38 times

1

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

What happens is that the tables T2 to T4 "should" be one. But as part of the data would be as if it were a table and its options, I preferred to break to become easier to maintain...

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

|Type|Schedule|Quantity|

|A | 12:00 | 4 |

That’s why I preferred to put in different tables to facilitate....

But now I don’t know how to save it in the database... because I need to register everything at the same time. That is, it would be a form of cascade: after registering the customer, it was related to the T2. After the T2 have been registered, relate her to the others (T3 and T4)...

How could I do that using the Entity Framework? How could I do that, since I don’t need to generate a controller and views(could be partial views) for this? My approach is correct or should I do everything in one table?

I hope I was clear.

  • It would be as if you were saving something like Customer and phone for example is this ?

  • This... Customer Type, Telephone and Address..

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.