FIK.DAL
1.0.5.22
See the version list below for details.
dotnet add package FIK.DAL --version 1.0.5.22
NuGet\Install-Package FIK.DAL -Version 1.0.5.22
<PackageReference Include="FIK.DAL" Version="1.0.5.22" />
paket add FIK.DAL --version 1.0.5.22
#r "nuget: FIK.DAL, 1.0.5.22"
// Install FIK.DAL as a Cake Addin
#addin nuget:?package=FIK.DAL&version=1.0.5.22
// Install FIK.DAL as a Cake Tool
#tool nuget:?package=FIK.DAL&version=1.0.5.22
FIK.DAL
A Simple SQL Query Generator Using ADO.NET Provider with SqlClient
Using This Library no need to write manual insert update or delete query. it also maintain Transaction.and Prevent SQL Injection.
To Use This Generate your table Model.cs Class and use this model for easy insert,update
FIK.DAL.SQL odal = new FIK.DAL.SQL("ConnectionString");
For Single Insert
public bool Create(Counter model, ref string msg)
{
model.CounterID = odal.GetMaxId("CounterID", "000", "Counter", "C");
return odal.Insert<Counter>(model, "", "", "", ref msg);
}
For Single Insert where primary key is auto generated
public bool Create(Counter model, ref string msg)
{
return odal.Insert<Counter>(model, "", "CounterID", "", ref msg);
}
For Single Update
public bool Update(Counter model, ref string msg)
{
// speicfy the column name you want to update and where clause for this update
return odal.Update<Counter>(model, "Name,MACAddress,IsActive,UpdateBy,UpdateDate", "CounterID", "", ref msg);
}
<br> For Single Delete<br>
public bool Remove(Counter model, ref string msg)
{
return odal.Delete<Counter>(model, "CounterID", "", ref msg);
}
<br> If your table name and mode name are different then speicfy the customTable name parameter. <br>
<br>If you want to insert or update two or more table at single trasaction then you can use this <br>
var data = odal.Select<Sales>(query, ref refMsg);
return data;
List<Sales> model; List<Stock> oVCAList
CompositeModel compositeModel = new CompositeModel();
compositeModel.AddRecordSet<Sales>(model, OperationMode.Insert, "", "", "", "");
compositeModel.AddRecordSet<Stock>(buyCentrals, OperationMode.Update, "", "-BalQty,+SQty", "PRD_ID,BranchId", "");
compositeModel.AddRecordSet<Sales>(model[0], OperationMode.Delete, "", "", "CREATE_BY", "TempSales");
odal.InsertUpdateComposite(compositeModel, ref msg);
<br>you can update table value with increment or decrement. <br>you can pass any single or list model to this operation. <br> <br>if your model class contain a property which not need for any insert update or delete operation only need for view purpose then you can use that property by adding following attribute.
public Class MyModel
{
[FIK_NoCUDAttribute]
public string CustomeColumn { get; set; }
}
you can easily select record from database by using
public List<Sales> GetInvoiecNo(string fromDate, string toDate)
{
string query = @"";
var data = odal.Select<Sales>(query, ref refMsg);
return data;
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
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.5.31 | 403 | 2/5/2021 |
1.0.5.30 | 519 | 12/2/2019 |
1.0.5.29 | 453 | 11/27/2019 |
1.0.5.28 | 520 | 11/26/2019 |
1.0.5.27 | 475 | 11/20/2019 |
1.0.5.26 | 466 | 11/20/2019 |
1.0.5.25 | 461 | 11/19/2019 |
1.0.5.24 | 474 | 11/10/2019 |
1.0.5.23 | 439 | 11/7/2019 |
1.0.5.22 | 505 | 9/13/2019 |
1.0.4.20 | 935 | 5/29/2018 |
1.0.3.19 | 939 | 4/27/2018 |
1.0.2.16 | 981 | 4/12/2018 |
1.0.2.14 | 914 | 3/18/2018 |
1.0.1.12 | 929 | 3/16/2018 |
some bug fix ,