Flat Forms: DynamicEditFormBase - ProCodersPtyLtd/MasterDetailsDataEntry GitHub Wiki
using Platz.SqlForms;
public abstract class DynamicEditFormBase : IDynamicEditForm
Base class for DynamicEditFormBase<T>
generic class
protected virtual void Define(DynamicFormBuilder builder)`
This method should be implemented in a Dynamic Form class that is inherited from DynamicEditFormBase<T>
. The method accepts only one parameter DynamicFormBuilder builder
. The following example shows how to use it:
protected override void Define(DynamicFormBuilder builder)
{
builder.Entity<Course>(e =>
{
e.Property(p => p.CourseID).IsPrimaryKey().IsUnique();
e.Property(p => p.Title).IsRequired();
...
});
}
using Platz.SqlForms;
public abstract class DynamicEditFormBase<T> : DynamicEditFormBase where T : DbContext
Base class to create a Dynamic Form definition.
DynamicEditFormBase accepts T
template parameter, it should be a class that based on Entity Framework DbContext
This class is only extension of FormBuilder
and currently doesn't provide any additional functionality