我正在尝试使用 Linq 输入 GUID。我的插入代码:
var registration = new Registration
{
FirstName = registrationInfo.FirstName,
LastName = registrationInfo.LastName,
AddressId = _dbcontext.Addresses.Max(x => x.AddressId),
Password = registrationInfo.Password,
EmailAddress = registrationInfo.EmailAddress,
IsActive = true,
IsDeleted = false,
Archived=false,
DateCreated = DateTime.Now
GUID = ?
};
任何人都可以帮忙替换“?” 一些有用的代码。