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
publicclassProfile:BaseEntity,IComparable<Profile>{[Display(Name=nameof(Resources.Models.Profile.LastName),ResourceType=typeof(Resources.Models.Profile))][MaxLength(128)]publicstring?LastName{get;set;}[Display(Name=nameof(Resources.Models.Profile.FirstName),ResourceType=typeof(Resources.Models.Profile))][MaxLength(128)]publicstring?FirstName{get;set;}[DatabaseGenerated(DatabaseGeneratedOption.Computed)]publicstringFullName{// Code-First do not change!get=>$"{LastName}{FirstName}";// ReSharper disable once UnusedMember.Local// ReSharper disable once ValueParameterNotUsedprivateset{}}[MaxLength(128)]publicstring?PhoneNumber{get;set;}}
If I update Profile (any properties, even PhoneNumber) and I use BulkSaveChangesAsync(), it throws this error :
{"The column \"FullName\" cannot be modified because it is either a computed column or is the result of a UNION operator."}
The only solution I found was to use the basic SaveChangesAsync(). Using [NotMapped] attribute isnt a solution since I'm using FullName in queries.
The text was updated successfully, but these errors were encountered:
I have a model that basically look like this
If I update Profile (any properties, even PhoneNumber) and I use
BulkSaveChangesAsync()
, it throws this error :{"The column \"FullName\" cannot be modified because it is either a computed column or is the result of a UNION operator."}
The only solution I found was to use the basic
SaveChangesAsync()
. Using[NotMapped]
attribute isnt a solution since I'm using FullName in queries.The text was updated successfully, but these errors were encountered: