CPIT.DynamicForm 1.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package CPIT.DynamicForm --version 1.0.6                
NuGet\Install-Package CPIT.DynamicForm -Version 1.0.6                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CPIT.DynamicForm" Version="1.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CPIT.DynamicForm --version 1.0.6                
#r "nuget: CPIT.DynamicForm, 1.0.6"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CPIT.DynamicForm as a Cake Addin
#addin nuget:?package=CPIT.DynamicForm&version=1.0.6

// Install CPIT.DynamicForm as a Cake Tool
#tool nuget:?package=CPIT.DynamicForm&version=1.0.6                

Dynamic forms

It is a .Net library which helps you to create dynamic forms in your .Net app

Before You Begin

Currently, the library only contains a dynamic query builder, and will have the dynamic form logic later.

How To Use

Use the CustomBuildQuery function

The CustomBuildQuery function accepts three required parameters:

  • Query: the query that you need to append the custom query to.
  • Rule: the rules to build the query, see the QueryBuilderFilterRule class as an example of the rule object. In case you need to query a collection inside your domain class, make sure to set the Field as CollectionName.{Id}.
  • InputManagerCollection: this is an instance from InputManagerCollection, in case of complicated queries, implement IInputManager interface for a property and define the logic to build the query for it.
Having an issue with DateTime conversion?

You should define how you are going to convert the string field to date, this depends on your database type. The following example is for a postgres DB:

  • Add this function in any extension class
public static ModelBuilder AddSqlFunctions(this ModelBuilder modelBuilder)
        {
            modelBuilder.HasDbFunction(() => ToDateTimeDbFunction(default))
                .HasTranslation(args => new SqlFunctionExpression(
                        functionName: "to_date",
                        arguments: args.Append(new SqlFragmentExpression("'mm/dd/yyyy'")),
                        nullable: true,
                        argumentsPropagateNullability: new[] { false, true, false },
                    type: typeof(DateTime),
                    typeMapping: null));

            return modelBuilder;
        }
  • Add the SQL function to your DBContext, inside OnModelCreating
builder.AddSqlFunctions();

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.7 837 2/27/2023
1.0.6 234 2/27/2023
1.0.5 255 2/17/2023
1.0.4 235 2/17/2023
1.0.3 229 2/17/2023
1.0.2 235 2/17/2023
1.0.1 227 2/17/2023
1.0.0 235 2/17/2023