Updating 2 tables Virginia sex dating

25-Sep-2019 08:21

As in, a bar can only have one address and one address can only have one bar.

Because I am storing this data in two separate tables, I am having a very difficult time trying to successfully implement an Edit action which takes data from one form (Bar Form) and should update both the Bar and Address database tables.

It can be any order as long as the value is 1 to 1.

If you omit the WHERE clause, all records in the table will be updated!

See my code: Bar Controller The problem here is that I am getting an empty Address Id with this setup, which is causing an exception when the Save action gets run.

This is because the Bar Form view is getting passed a View Model which has been mapped from a Bar object and the Bar domain model actually has no Address information in it, since it is not the Address model/table.

updating 2 tables-80

bitdefender constantly updating

But as it is right now, I'm getting an error saying that how I have it set up, the Address Id is not getting through properly.

I have never had to update several tables at once in an edit action in ASP. This is the layout: I have a DB table called "Address" which has fields for Street Number, Street Name, City, State, Zip Code.