CPIT.DynamicForm 1.0.7

dotnet add package CPIT.DynamicForm --version 1.0.7
NuGet\Install-Package CPIT.DynamicForm -Version 1.0.7
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.7" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CPIT.DynamicForm --version 1.0.7
#r "nuget: CPIT.DynamicForm, 1.0.7"
#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.7

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

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 723 2/27/2023
1.0.6 207 2/27/2023
1.0.5 229 2/17/2023
1.0.4 210 2/17/2023
1.0.3 205 2/17/2023
1.0.2 206 2/17/2023
1.0.1 204 2/17/2023
1.0.0 207 2/17/2023