Just call:
something.OrderBy(r => Guid.NewGuid()).Take(5)
More Related Contents:
- Ignoring a class property in Entity Framework 4.1 Code First
- Navigation Property without Declaring Foreign Key
- An error occurred while saving entities that do not expose foreign key properties for their relationships
- Create code first, many to many, with additional fields in association table
- EF codefirst : Should I initialize navigation properties?
- Unique key with EF code first
- Entity Framework (EF) Code First Cascade Delete for One-to-Zero-or-One relationship
- Entity Framework Join 3 Tables
- The entity type is not part of the model for the current context
- EF Including Other Entities (Generic Repository pattern)
- Why is .Contains slow? Most efficient way to get multiple entities by primary key?
- EF Code First – how to set identity seed?
- Entity Framework Code First Lazy Loading
- How to declare one to one relationship using Entity Framework 4 Code First (POCO)
- Mapping Database Views to EF 5.0 Code First w/Migrations
- Optimistic concurrency: IsConcurrencyToken and RowVersion
- Place to put Database.SetInitializer
- Better way to query a page of data and get total count in entity framework 4.1?
- EF4 Code First: how to add a relationship without adding a navigation property
- Can you get the DbContext from a DbSet?
- How do I specify that a property should generate a TEXT column rather than an nvarchar(4000)
- How to Specify Primary Key Name in EF-Code-First
- Entity Framework and multiple schemas
- Entity Framework 4.1: Unable to cast from DbQuery to ObjectQuery
- Entity Framework: Duplicate Records in Many-to-Many relationship
- Mixing Fluent API and DataAnnotations in EF code first
- mapping multiple tables to a single entity class in entity framework
- The relationship could not be changed because one or more of the foreign-key properties is non nullable
- Entity Framework: field of composite key cannot be nullable?
- Create association on non-primary key fields with Entity Framework 4.1 Fluent API