Method Create
Create<T>(IEntityService<T>, IPropertyValues, CancellationToken)
Creates a new entity of type T using the IEntityService<T> and sets its property values.
public static Task<T> Create<T>(this IEntityService<T> entityService, IPropertyValues propertyValues, CancellationToken cancellationToken = default) where T : class
Parameters
entityServiceIEntityService<T>The IEntityService<T> instance.
propertyValuesIPropertyValuesThe property values to set on the new entity.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<T>
A task representing the asynchronous operation. The task result contains the newly created entity with the specified property values set.
Type Parameters
TThe type of the entity.