New Posts New Posts RSS Feed: Constrains in DataBase.
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Constrains in DataBase.

 Post Reply Post Reply
Author
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Topic: Constrains in DataBase.
    Posted: 12-Jul-2012 at 10:02am
Hi,
 
 
public class Initializer : IDatabaseInitializer<MyDbContext> {
  public void InitializeDatabase(MyDbContext context) {
    ...
    context.Database.ExecuteSqlCommand("CREATE INDEX...");
  }
}
 
In Model First/Database First, unfortunatelly there's no equivalent for the "Indexed" attribute in DevForce. (Actually EF does not support it)
Regards,
   Silvio.
Back to Top
rbautistaole View Drop Down
Newbie
Newbie


Joined: 01-Apr-2011
Posts: 37
Post Options Post Options   Quote rbautistaole Quote  Post ReplyReply Direct Link To This Post Posted: 10-Jul-2012 at 7:00pm
Hi.
In DevExpress.XPO i can mark a property with a attribute as

[Indexed("CampoB", Unique = true)]

public int CampoA {
 
to generate a composed index (campoA, campoB) on the database either unique or not.
Do Devforce has some equivalent?
thanks.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down