مولّد طبقات الكود لـ VB.NET 4 / ASP.NET 4
LayerGen For DotNet 4 هو أداة سطح مكتب (WinForms) تتصل بقاعدة بيانات SQL Server وتولّد تلقائياً طبقات الكود الكاملة بأسلوب VB.NET 4 / ASP.NET 4 الكلاسيكي:
- DataLayer — كلاس يحتوي على جميع عمليات القراءة والحفظ والحذف
- BusinessLayer — كلاس الأعمال مع دعم المجموعات (CollectionBase)
- Stored Procedures — سكريبت SQL جاهز للتنفيذ على قاعدة البيانات
- Windows 10 / 11
- .NET 10 Desktop Runtime
- SQL Server (أي إصدار)
- شغّل
LayerGenForDotNet4.exe(أوrun.batللتحقق من وجود .NET تلقائياً) - أدخل بيانات الاتصال بقاعدة البيانات
- اضغط اتصال
- اختر الجداول التي تريد توليد كودها
- حدد خيارات التوليد (VB.NET / C# / Stored Procedures)
- حدد مجلد الإخراج
- اضغط إنشاء الكود 🚀
| الخيار | الوصف |
|---|---|
| VB.NET | يولّد TableData.VB و TableBusiness.VB |
| C# | يولّد TableData.cs و TableBusiness.cs |
| Stored Procedures | يولّد ملف Procedures.SQL |
| Universal + Interfaces | يولّد ملفات البنية التحتية المشتركة |
| ملفات Custom | يولّد ملفات قابلة للتعديل اليدوي (لا تُكتب فوقها) |
| تطبيق SP مباشرةً | ينفّذ السكريبت على قاعدة البيانات فور التوليد |
| False Erase | حذف منطقي — يضع IsDeleted = 1 بدلاً من حذف السجل |
OutputFolder/
├── Universal.VB ← مشترك لجميع الجداول (يُنشأ مرة واحدة)
├── Interfaces.VB ← الواجهات المشتركة
├── TableNameData.VB ← DataLayer
├── TableNameBusiness.VB ← BusinessLayer
├── TableNameDataCustom.VB ← للتعديل اليدوي (لا يُكتب فوقه)
├── TableNameBusinessCustom.VB ← للتعديل اليدوي (لا يُكتب فوقه)
└── Procedures.SQL ← جميع الـ Stored Procedures
git clone https://github.com/your-username/LayerGenForDotNet4.git
cd LayerGenForDotNet4
dotnet build -c ReleaseCode Layer Generator for VB.NET 4 / ASP.NET 4
LayerGen For DotNet 4 is a WinForms desktop tool that connects to a SQL Server database and automatically generates complete code layers in classic VB.NET 4 / ASP.NET 4 style:
- DataLayer — class containing all read, save, and delete operations
- BusinessLayer — business class with CollectionBase support
- Stored Procedures — ready-to-run SQL script
- Windows 10 / 11
- .NET 10 Desktop Runtime
- SQL Server (any version)
- Run
LayerGenForDotNet4.exe(orrun.batto auto-check for .NET) - Enter your SQL Server connection details
- Click Connect
- Select the tables you want to generate code for
- Choose generation options (VB.NET / C# / Stored Procedures)
- Select an output folder
- Click Generate Code 🚀
| Option | Description |
|---|---|
| VB.NET | Generates TableData.VB and TableBusiness.VB |
| C# | Generates TableData.cs and TableBusiness.cs |
| Stored Procedures | Generates Procedures.SQL file |
| Universal + Interfaces | Generates shared infrastructure files |
| Custom Files | Generates manually-editable files (never overwritten) |
| Apply SP directly | Executes the script against the database immediately |
| False Erase | Soft delete — sets IsDeleted = 1 instead of deleting the record |
OutputFolder/
├── Universal.VB ← shared for all tables (created once)
├── Interfaces.VB ← shared interfaces
├── TableNameData.VB ← DataLayer
├── TableNameBusiness.VB ← BusinessLayer
├── TableNameDataCustom.VB ← manually editable (never overwritten)
├── TableNameBusinessCustom.VB ← manually editable (never overwritten)
└── Procedures.SQL ← all Stored Procedures
git clone https://github.com/your-username/LayerGenForDotNet4.git
cd LayerGenForDotNet4
dotnet build -c ReleaseMIT License