You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using the commercial version of Z.EntityFramework.Plus.EFCore and using a lot of
BulkInsertAsync()
BulkUpdateAsync()
BulkDeleteAsync()
BulkSynchronizeAsync()
We were under the impression that ZEntity was validating each model and their DataAnnotation before saving, like EF Core does. We had an edge case where the database column would allow NULL (for legacy purpose) but the EF Model was declared as
[Required] // Here we want to simulate a DB that allows null but marked as required on the model
public int? NullableInt { get; set; }
To our surprise, the Bulk methods would allow invalid values (null) to reach the database. I just want to validate your official position regarding DataAnnotations. Should we validate each object manually before calling Bulk() methods or is that something that should be handled by ZEntity Bulk() methods ?
Thanks for your time!
Further technical details
.NET Core 8
EF Core v8.0.5
Z.EntityFramework.Plus.EFCore: [v8.102.2.4]
Database Server version: [SQL Server 2022]
The text was updated successfully, but these errors were encountered:
Description
We are using the commercial version of Z.EntityFramework.Plus.EFCore and using a lot of
We were under the impression that ZEntity was validating each model and their DataAnnotation before saving, like EF Core does. We had an edge case where the database column would allow NULL (for legacy purpose) but the EF Model was declared as
To our surprise, the Bulk methods would allow invalid values (null) to reach the database. I just want to validate your official position regarding DataAnnotations. Should we validate each object manually before calling Bulk() methods or is that something that should be handled by ZEntity Bulk() methods ?
Thanks for your time!
Further technical details
The text was updated successfully, but these errors were encountered: