Zontroy Code Generator
  • 🖌️Getting started with Zontroy
  • INTRODUCTION
    • Zontroy Code Generator
    • Advantages of Zontroy Code Generator
    • Installation
    • Zontroy Programming Language
    • Zontroy Environment
    • Zontroy Commands
  • Zontroy Project Types
    • Zontroy Project
      • Oprazi .zproject file for MSSQL
      • CrudwithGo .zproject file for MySQL
      • Course-management .zproject file for Entity
      • JavaCodeGenerator .zproject file for PostgreSQL
  • Zontroy File Types
    • Zontroy Single File
    • Zontroy Repeating File
    • Zontroy Inner Repeating File
  • Zontroy Tutorial
    • Zontroy Syntax
    • zg-entity
    • zg-entities
    • zg-if
    • zg-for
    • Data Type Conversion
    • Built-in Functions
  • Use Together
    • Github Copilot
    • ChatGPT
  • Zontroy How To
    • Javascript
    • Typescript
    • Java
    • Python
    • CSharp
    • PHP
Powered by GitBook
On this page
  • zref
  • File Naming Format
  • File Naming Example
  • Code Example
  • Output Example
  1. Zontroy File Types

Zontroy Repeating File

PreviousZontroy Single FileNextZontroy Inner Repeating File

Last updated 7 months ago

zref

Zontroy Repeating File is used to create multiple code files and generate lines of code inside those. It uses .zref extension. Name of zref file is set programatically by entering a name in Zontroy Programming Language.

File Naming Format

[file_name].[file_extension].zref

File Naming Example

[[[zg-entity...zg-name]]].java.zref

Code Example

A simple usage example of zref file in C#.

// Izg-singularize(((zg-entity...zg-name)))Service.cs.zref
using Oprazi.Dto.DTOs;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Oprazi.Bll.Services.IServices
{
    public interface Izg-singularize(((zg-entity...zg-name)))Service
    {
        Task<zg-singularize(((zg-entity...zg-name)))ToResponseDTO> Getzg-pluralize(((zg-entity...zg-name)))(zg-singularize(((zg-entity...zg-name)))ToFilterDTO filter);
        Task<zg-singularize(((zg-entity...zg-name)))DTO> Getzg-singularize(((zg-entity...zg-name)))ById(int Id);
        Task<zg-singularize(((zg-entity...zg-name)))DTO> Addzg-singularize(((zg-entity...zg-name)))(zg-singularize(((zg-entity...zg-name)))ToAddDTO zg-lower(((zg-singularize(((zg-entity...zg-name))))))ToAddDTO);
        Task Updatezg-singularize(((zg-entity...zg-name)))(zg-singularize(((zg-entity...zg-name)))DTO zg-lower(((zg-singularize(((zg-entity...zg-name))))))DTO);
        Task Deletezg-singularize(((zg-entity...zg-name)))(int Id);
    }
}

Output Example

// IBankService.cs
using Oprazi.Dto.DTOs;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Oprazi.Bll.Services.IServices
{
    public interface IBankService
    {
        Task<BankToResponseDTO> GetBanks(BankToFilterDTO filter);
        Task<BankDTO> GetBankById(int Id);
        Task<BankDTO> AddBank(BankToAddDTO bankToAddDTO);
        Task UpdateBank(BankDTO bankDTO);
        Task DeleteBank(int Id);
    }
}
// IBankBranchService.cs
using Oprazi.Dto.DTOs;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Oprazi.Bll.Services.IServices
{
    public interface IBankBranchService
    {
        Task<BankBranchToResponseDTO> GetBankBranches(BankBranchToFilterDTO filter);
        Task<BankBranchDTO> GetBankBranchById(int Id);
        Task<BankBranchDTO> AddBankBranch(BankBranchToAddDTO bankbranchToAddDTO);
        Task UpdateBankBranch(BankBranchDTO bankbranchDTO);
        Task DeleteBankBranch(int Id);
    }
}
// IBankAccountService.cs
using Oprazi.Dto.DTOs;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Oprazi.Bll.Services.IServices
{
    public interface IBankAccountService
    {
        Task<BankAccountToResponseDTO> GetBankAccounts(BankAccountToFilterDTO filter);
        Task<BankAccountDTO> GetBankAccountById(int Id);
        Task<BankAccountDTO> AddBankAccount(BankAccountToAddDTO bankaccountToAddDTO);
        Task UpdateBankAccount(BankAccountDTO bankaccountDTO);
        Task DeleteBankAccount(int Id);
    }
}

Good to know: In daily programming, controller, validator, service, repository etc classes are sample classes which for using a repeating code file.

Multiple entities to multiple code files