Browse Source
Merge pull request #8602 from abpframework/extension-property-dbfix
Extension Property DB Mapping Fix For Enums
pull/8605/head
Halil İbrahim Kalkan
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
0 deletions
-
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
|
|
|
@ -349,6 +349,10 @@ namespace Volo.Abp.EntityFrameworkCore |
|
|
|
{ |
|
|
|
entryProperty.CurrentValue = TypeDescriptor.GetConverter(conversionType).ConvertFromInvariantString(entityProperty.ToString()); |
|
|
|
} |
|
|
|
else if (conversionType.IsEnum) |
|
|
|
{ |
|
|
|
entryProperty.CurrentValue = Enum.ToObject(conversionType, entityProperty); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
entryProperty.CurrentValue = Convert.ChangeType(entityProperty, conversionType, CultureInfo.InvariantCulture); |
|
|
|
|