BiometricZktecoDeviceCommunication 1.0.0
dotnet add package BiometricZktecoDeviceCommunication --version 1.0.0
NuGet\Install-Package BiometricZktecoDeviceCommunication -Version 1.0.0
<PackageReference Include="BiometricZktecoDeviceCommunication" Version="1.0.0" />
paket add BiometricZktecoDeviceCommunication --version 1.0.0
#r "nuget: BiometricZktecoDeviceCommunication, 1.0.0"
// Install BiometricZktecoDeviceCommunication as a Cake Addin #addin nuget:?package=BiometricZktecoDeviceCommunication&version=1.0.0 // Install BiometricZktecoDeviceCommunication as a Cake Tool #tool nuget:?package=BiometricZktecoDeviceCommunication&version=1.0.0
ZKTeco Device Communication
This package provides functionality for communicating with ZKTeco devices. It includes easy methods and built-in attendance models along with other frequently used methods such as CRUD operations for users and Read, Delete.
Installation
Install the package via NuGet:
powershell
Install-Package ZKTecoDeviceCommunication
#Usage Here is an example of how to use the package in an ASP.NET Core application:
Configure Services In Startup.cs or Program.cs (depending on your project setup), add the following service configuration: builder.Services.AddScoped<IZKTecoAttendance_DataFetchBL, ZKTecoAttendance_DataFetchBL>();
Create a Controller Create a controller that uses the IZKTecoAttendance_DataFetchBL service. Below is an example implementation: using Attendance_ZKTeco_Service.Interfaces; using AttendanceFetch.Models; using biometricApplicationNugetPackageIntegration.Models; using Microsoft.AspNetCore.Mvc; using System.Diagnostics;
namespace biometricApplicationNugetPackageIntegration.Controllers { public class HomeController : Controller { private readonly ILogger<HomeController> _logger; private readonly IZKTecoAttendance_DataFetchBL _ztecoAttendance_DataFetchBL;
public HomeController(ILogger<HomeController> logger, IZKTecoAttendance_DataFetchBL ztecoAttendance_DataFetchBL)
{
_logger = logger;
_ztecoAttendance_DataFetchBL = ztecoAttendance_DataFetchBL;
}
public async Task<IActionResult> Index()
{
var model = new AttendanceDevice
{
Id = 1,
AttendanceDeviceTypeId = 1,
DeviceTypeName = "zkteco",
ModelNo = "string",
DeviceMachineNo = 1,
IPAddress = "192.168.20.19",
Port = 4370,
StatusChgUserId = 0,
ClientAlias = "admin"
};
var result = await _ztecoAttendance_DataFetchBL.GetData_Zkteco(model);
if (result.ResultType == ResultType.Success)
{
// Handle success
Console.WriteLine("Data retrieved successfully!");
foreach (var machineInfo in result.Data)
{
// Process each MachineInfo item
Console.WriteLine($"Machine Info: {machineInfo}");
}
}
else
{
// Handle failure
Console.WriteLine($"Failed to retrieve data: {result.Message}");
}
return View();
}
public IActionResult Privacy()
{
return View();
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}
}
Features
- Connect to ZKTeco devices
- CRUD operations for users (Create, Read, Update, Delete)
- Retrieve attendance records
- Easy integration with .NET applications
Dependencies
- Newtonsoft.Json 13.0.1
- Add other dependencies
- Compatibility
- This package is designed for .NET Standard 2.0
- Note: This package may not work with .NET 7
Customization and Support
For other customization like scheduling data retrieval, deletion, and other project integration work, contact:
Email: gauravmaharjan000@gmail.com
LinkedIn: Gaurav Maharjan License This project is licensed under the MIT License.
This README.md
file provides a comprehensive guide on how to install, configure, and use the ZKTecoDeviceCommunication package, including example code for integrating the service into an ASP.NET Core application.
Product | Versions 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.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 2.1.0)
- ZKTecoProfessionalSDK (>= 1.1.0)
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.0 | 233,417 | 6/24/2024 |
Initial release.