DbFunctionsExtensions.Random(DbFunctions) Method

Definition

A random double number generator which generates a number between 0 and 1, exclusive.

public static double Random (this Microsoft.EntityFrameworkCore.DbFunctions _);
static member Random : Microsoft.EntityFrameworkCore.DbFunctions -> double
<Extension()>
Public Function Random (_ As DbFunctions) As Double

Parameters

_
DbFunctions

The DbFunctions instance.

Returns

A random double number between 0 and 1, exclusive.

Remarks

This DbFunction method has no in-memory implementation and will throw if the query switches to client-evaluation. This can happen if the query contains one or more expressions that could not be translated to the store.

Applies to