zzz projects Entity Framework Core EF Core
Home Articles Knowledge Base Online Examples
  • Home
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework Core - Knowledge Base (KB)

6 results in tag: indexing

Creating indexes with Entity Framework 6 Migrations

Is there a way to create an index in MS SQL Server database using Entity Framework Code First Migrations, if the index has to be: ...descending by at least one column...including other columns...?...It has to produce something like this:...CREATE NONCLUST...
ef-code-first entity-framework entity-framework-6 indexing sql-server-2012
asked by Michael Sagalovich

In Entity Framework 6.1 (not Core), how can I use the IndexAttribute to define a clustered index?

Entity Framework 6.1 (code-first) has added the possibility of adding indexes via the ...IndexAttribute.... The attribute takes a parameter for specifying whether the index should be clustered or non-clustered....At the same time, AFAIK, Entity Framework ...
c# entity-framework entity-framework-6 indexing
asked by Fabian Schmied

How to add Unique Key for a column in a model in EF code first

I am trying to make a column as Unique key in my model....my code is :...public class Customer { [Index("abcd",IsUnique = true)] public int CustomerID { get; set; } } ...and I am using following references:...using System.ComponentModel.DataAnnota...
entity-framework entity-framework-6 indexing
asked by Santosh

EF Code-First Add Unique Index to Column

In my Entity-Framework Code-First Model I have a Table that needs one column to have unique values. I want to apply an Unique Index to it as I saw that it is very easy in EF 6.1...public partial class User { public int Id { get; set; } [Index(IsUni...
c# entity-framework entity-framework-6 indexing unique
asked by Vinz

How to add an index on multiple columns with ASC/DESC sort using the Fluent API?

I have a MVC ASP.NET application using Entity Framework 6 - Code First approach. ...Using the Fluent API, how can I add an index on multiple columns with ASC/DESC sort that is different for each column ?...I've seen many examples using multiple columns b...
ef-code-first ef-fluent-api entity-framework entity-framework-6 indexing
asked by Maxime

Fulltext index Code First EF Core 2.1?

how do I add to my fluent api a full text index?...I just see HasIndex()... public void Configure(EntityTypeBuilder<Company> builder) { builder.HasKey(x => x.Id); builder.Property(x => x.Id).ValueGeneratedOnAdd(); ...
entity-framework-core indexing sql-server
asked by chobo2

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!