Get Started

this documentation Contains all information you will need to get statred with GCF, the first thing you need to do is setting up the connection string to the database, to do that just add DbConnection as setting in the Web.config or appSetting then add a connection string as value of it

then yon just start Communicate with a data base like that

GCF contains the following class

  • Operations

    this class Contains all the mothod you need in order to work with data base
  • Parameter

    use this class to send parameter to SQL statement
    • Name

      Name of Parameter
    • Value

      value of Parameter
    • ParameterDirection

      Direction of the parameter
      • IN

        Parameter Input
      • Out

        Parameter Inputout
  • PrimaryKey

    This class is derived from Attribute and you can use it to determine the master key in a particular object.
  • ForeignKey

    This classification is derived from Attribute and you can use it to determine the foreign key in the specified object.
  • CommandType

    From which you can select the type of action that you perform as likely to be one of the three options.
    • StoredProcedure

      If the query syntax is stored in the database
    • TableDirect

      If the query is a table directly
    • Text

      If the query is a query syntax normal text
  • AutoValidation

    Derived from the Attribute Use this class to determine the characteristics of checking the object's fields where you can specify the following:
    • AllowNull

      property can be Null or not.
    • ErrorMessage

      Error message that appears to the user in the event of an error
    • Expression

      Expression of the special characteristic of this part you can use, for example, when checking e-mail, when you use this type must be equal to the property Type Custom
    • Type

      checking Type and may be following types
      • Custom

        When you want to determine the verification of the text that follows Expression
      • DataBaseExistence

        You can use it with objects related with the main object where it will be checked in the database query The fact that this object exists in the database or not.
      • Number

        check if value is digit
      • NumberIsBiggerThen

        check if value is digit and bigger then value
      • NumberIsLessThen

        check if value is digit and less then
  • DataBaseExistence

    derived from Attribute and can be used to determine how or property that will be used to Know about an existing object in the database or not

Execute Query

You can query using the GCF in various ways where there is more than one way to do the query when we talk about the query, we are talking openly about the sentences if we split the query to:

  • query and get data table with Text Query
  • Passing Parameters and get Data Table with Text Query
  • Query and get data table with Stored Procedure without passing parameters
  • Query and get data table with Stored Procedure with parameters
  • Query and anf object with Text Query
  • Passing Parameters and get object with Text Query
  • Query and get object with Stored Procedure without passing parameters
  • Query and get object with Stored Procedure with parameters
  • Passing Parameters and get List object with Text Query
  • Passing Parameters and get List object with Text Query with parameters
  • Query and get object with Stored Procedure without parameters
  • Query and get object with Stored Procedure with parameters

Operations

you can do Update, insert and Delete with GCF with or without output parameters, By the following methods:

  • with no data mapping
  • with no data mapping and List of output parameters
  • With data mapping
  • with data mapping and one integer output
  • You can also use Text Query with or without data mapping

Auto Vlidation

By enabling Auto Vlidation you can do all the check Necessary without using if

  • AllowNull

    check if object is null
  • Error Message

    Error message to show to the user
  • Expression

    vildat with Expression

Encryption and decryption

if you want to encrypt and decrypt data just set AllowEcnryption to Ture and set the Encryption key in the app.config or web.config this will encrypt and decrypt everything, or you can just encrypt and decrypt text manually

  • Encrypt and decrypt everything

    To do that just set AllowEncryption and the Ecnryption key in the web.config and app.config
  • Encrypt text with a certain pass encryption key

  • Encrypt text with a certain key encryption in the files of the config

  • Decrypt text with a certain encryption key files in the Config

  • Decrypt text with a certain pass encryption key

Generating COde

In addition to the enormous advantage GCF provide you with generation, where the installation package comes with                      Generator Code for the Model and the Controller

  1. Select the database click on the icon in the window of the database and tables and then type the connection then press the Save
  2. After connecting to the database directly, you can review the list of tables in the database where it will be listed in the window tables and project
  3. To Review of the Model Code and the Controller you can click twice on the name of the table, or pressure right then click on Show Code oe C # File Icon
  4. To modify the properties of the table select the table from the window tables and the legislature will be directly specified in the screen properties                          You can modify several properties such as the name and stored procedures that you will use and the characteristics of the different fields in the table of sorts property Columns
  5. To modify the properties of the project and the location of the generated code click on the icon named C # project will show the characteristics of the project
  6. Code generation Click on the icon code generation the generated code will place in C: \ Test \ by defult