简体   繁体   中英

ASP.NET Web APi savechanges problem mysql

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.

在此处输入图像描述

Id_pracowika is always set to 0

在此处输入图像描述

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

I figured it out by recreating entity model.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM