Class BinaryValueGenerator
- Namespace
- Microsoft.EntityFrameworkCore.ValueGeneration
- Assembly
- Microsoft.EntityFrameworkCore.dll
Generates an array bytes from NewGuid(). The generated values are non-temporary, meaning they will be saved to the database.
public class BinaryValueGenerator : ValueGenerator<byte[]>
- Inheritance
-
BinaryValueGenerator
- Inherited Members
Remarks
See EF Core value generation for more information and examples.
Constructors
BinaryValueGenerator()
public BinaryValueGenerator()
Properties
GeneratesTemporaryValues
Gets a value indicating whether the values generated are temporary or permanent. This implementation always returns false, meaning the generated values will be saved to the database.
public override bool GeneratesTemporaryValues { get; }
Property Value
Methods
Next(EntityEntry)
Gets a value to be assigned to a property.
public override byte[] Next(EntityEntry entry)
Parameters
entry
EntityEntry
Returns
- byte[]
The value to be assigned to a property.