ZDAL 6.1.0

dotnet add package ZDAL --version 6.1.0
NuGet\Install-Package ZDAL -Version 6.1.0
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="ZDAL" Version="6.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ZDAL --version 6.1.0
#r "nuget: ZDAL, 6.1.0"
#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 ZDAL as a Cake Addin
#addin nuget:?package=ZDAL&version=6.1.0

// Install ZDAL as a Cake Tool
#tool nuget:?package=ZDAL&version=6.1.0

SQL SELECT Query Functions

If the query is "Select * From Chapter where ChaptrerId = 5"

Use any one query of below to SELECT the data from Chapter table

Chapter objChapter = new Chapter() { ChapterId = 5 };
List<Chapter> lst = await ChapterBLL.SelectList(objChapter);

OR

List<Chapter> lst = await ChapterBLL.SelectList(new Chapter() { ChapterId = 5 });

Same you can do with AND Conditions. If the query is "Select * From Chapter where ChaptrerId = 5 AND ChapterNumber = 3"

Use below to SELECT the data from Chapter table

List<Chapter> lst = await ChapterBLL.SelectList(new Chapter() { ChapterId = 5, ChapterNumber = 3 });

SQL INSERT Query Functions

Use below query to INSERT the data to Chapter table

var objChapter = new Chapter()
{
	SubjectId = 1,
	ChapterName = “Set Theory”,
	ChapterNumber = 2,
};
await ChapterBLL.Insert(objChapter);
OR
int NewId = await ChapterBLL.InsertId(objChapter);

"NewId" Will have value of primary Key of new inserted Row.

SQL UPDATE Query Functions

Use below query to UPDATE the data in Chapter table

var objChapter = new Chapter()
{
	ChapterId = 2
	SubjectId = 1,
	ChapterName = “Set Theory”,
	ChapterNumber = 2,
};
int Count = await ChapterBLL.Update(objChapter);

"Count" Will Number of rows Updated by Query.

SQL DELETE Query Functions

Use below query to DELETE the data from Chapter table

int Count = await ChapterBLL.Delete(new Chapter() { ChapterId = 5 });

"Count" Will Number of rows Deleted by Query.

Note: We prefer to delete by primary key only.

Step to Make Custom SQL Query Functions

Step 1 - Add enum in BLL.eQuery File

public enum eQuery
{	
	.
	.
	.
	.
	.
	Get_All_Branch = 5,
}

Step 2 - Add Same Name Method in BLL.Queries Class

public static string Get_All_Branch()
{
	return @"
	SELECT 
		BranchId,
		BranchName,
		Language,
		eStatus,
		SerialNo,
		LastUpdateTime
	
	FROM Branch

	WHERE (@SchoolUniqueId	IS NULL OR SchoolUniqueId	= @SchoolUniqueId)
		AND	(@MasterSearch	    IS NULL OR BranchName       LIKE '%' + @MasterSearch +'%') 
		AND	(@eStatus			IS NULL OR eStatus			= @eStatus)
		AND	(@eStatusNot		IS NULL OR eStatus			<> @eStatusNot)
	
	ORDER BY eStatus, SerialNo";
}

Step 3 - Add Query Parameter if any in BOL.Query

public class Query : IModel
{
	.
	.
	.	
	.	
	.
	[ModelPropertyAttribute("MasterSearch", "select")]
	public string MasterSearch { get; set; }
}

Step 4 - To Call That Query

var lstData = await QueryBLL.ExeQuery<AllBranchDto>(new Query()
{
	SchoolUniqueId = jwtPayload.SchoolUniqueId,
	MasterSearch = request.MasterSearch,
	eStatus = (int)request.eStatus,
}, eQuery.Get_All_Branch);
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
6.1.0 249 9/26/2023
6.0.0 121 9/15/2023
5.1.0 148 5/18/2023
5.0.0 335 2/8/2023
4.9.2 225 2/8/2023
4.9.1 232 2/1/2023
4.9.0 242 1/19/2023
4.8.0 370 10/15/2022
4.7.0 347 10/15/2022
4.6.0 354 10/13/2022
4.5.0 347 10/12/2022
4.4.0 348 10/12/2022
4.3.0 348 10/8/2022
4.2.0 335 10/8/2022
4.1.0 383 9/12/2022
4.0.0 378 9/4/2022

Data Access Layer for SQL Data Access