You are calling SaveChanges
outside the AbpSession.Use
block.
Make method virtual
and add mark it as [UnitOfWork]
.
https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4147
It may be sufficient to call _unitOfWorkManager.Current.SaveChanges()
just before you return
from the AbpSession.Use
block if you don't make further changes.
Otherwise, you need to begin a new unit of work inside that block.
Why are you defining additional Id
properties?
As I have mentioned, you don't need ForeignKey
attribute, so just remove it from your original code and it will be configured by convention.
You don't need ForeignKey
attribute, it will be configured by convention:
https://docs.microsoft.com/en-us/ef/core/modeling/relationships#conventions
Id
is the PK of MMTABS
table.
Remove WebDAV.
References:
What are you hosting your app on?
Why are you setting the primary key as the foreign key?