Dynamic Data

Posts   
 
    
quentinjs avatar
quentinjs
User
Posts: 110
Joined: 09-Oct-2009
# Posted on: 18-Oct-2009 08:26:58   

For those doing Dynamic Data within a MVC, once the LLBLGen Dynamic Data files are installed, you can skip the global.asax file step.

I found you need to place the class into the LLBL project, I placed mine into the EntityClasses folder.

Sample class follows:

using glossaryDB.EntityClasses; using SD.LLBLGen.Pro.ORMSupportClasses; using System.ComponentModel.DataAnnotations; using System;

namespace glossaryDB.EntityClasses { [MetadataType(typeof(GroupEntityMD))] public partial class GroupEntity { }

public class GroupEntityMD { [DataType(DataType.Date)] public object CreateDate { get; set; }

    [ScaffoldColumn(false)]
    public object IsActive { get; set; }
 }

}

Hope this helps someone else. You will also need to look at the asp.net/mvc tutorials on the views to have your dynamic data actually show up. I do not know if the ScaffoldColumn works dynamically after the view is created or only during the view creation step.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 19-Oct-2009 05:02:04   

Mmm. Interesting. Thanks for sharing.

David Elizondo | LLBLGen Support Team