ASP.NET Web APi savechanges problem mysql

Viewed 47
upr.Status = "Aktualne";
db.uprawnienia.Add(upr);
db.SaveChanges();
return upr.uprawnienia_id;

When i try to add data to database all columns are inserting correctly.

enter image description here

Id_pracowika is always set to 0

enter image description here

I can't figure it. I have also no idea why is it happening

1 Answers

I figured it out by recreating entity model.

Related