EFCore.BulkExtensions
EFCore.BulkExtensions copied to clipboard
[Key] does not support customization?
- Test new string ID
- context.BulkInsertOrUpdate(items, b => b.SetOutputIdentity = true);
- Error System.InvalidOperationException: 'No mapping exists from object type System.RuntimeType to a known managed provider native type.'
public class Student : TopBasePoco
{
[Key]
[StringLength(36)]
public new string ID { get; set; }
// 。。。。
}
//Test
context.BulkInsertOrUpdate(items, b => b.SetOutputIdentity = true);
//Is Failed
// System.InvalidOperationException: 'No mapping exists from object type System.RuntimeType to a known managed provider native type.'
//
// Summary:
// TopBasePoco
public class TopBasePoco
{
private bool? _isBasePoco;
//
// Summary:
// Id
[Key]
public Guid ID { get; set; }