procedure

“procedure” is a reference for the procedure generated by using a zref template file. You can access properties of this reference which are predefined in Zontroy. The procedure properties are as follows:

– name
– label
– primaryKey
– primaryKeyDataType
– displayColumn
– displayColumnDataType

 

Sample Implementation

Input

// I[[[procedure.name]]]Service.java.zref

import java.util.List;
public interface I[[[procedure.name]]]Service
{
public partial interface I[[[procedure.name]]]Service
{
List<[[[procedure.name]]]> GetAll();

[[[procedure.name]]] Get([[[procedure.primaryKeyDataType]]] [[[procedure.primaryKey]]]);
}
}

Output

// IProductsService.java
import java.util.List;
public interface IProductsService
{
List<Products> GetAll();

Products Get(int ProductID);
}

// ICategoriesService.java
import java.util.List;
public interface ICategoriesService
{
List<Categories> GetAll();

Categories Get(int CategoryID);
}

// IOrdersService.java
import java.util.List;
public interface IOrdersService
{
List<Orders> GetAll();

Orders Get(int OrderID);
}

Input

// I[[[procedure.name]]]Service.cs.zref
using System;
using System.ServiceModel;
using System.Collections.Generic;
using MyProject.Entities.Concrete;
namespace MyProject.Business.Abstract
{
[ServiceContract]
public partial interface I[[[procedure.name]]]Service
{
[OperationContract]
List<[[[procedure.name]]]> GetAll();
[OperationContract]
[[[procedure.name]]] Get([[[procedure.primaryKeyDataType]]] [[[procedure.primaryKey]]]);
}
}

Output

// IProductsService.cs

using System;
using System.ServiceModel;
using System.Collections.Generic;
using MyProject.Entities.Concrete;
namespace MyProject.Business.Abstract
{
[ServiceContract]
public partial interface IProductsService
{
[OperationContract]
List<Products> GetAll();
[OperationContract]
Products Get(int ProductID);
}
}

// ICategoriesService.cs
using System;
using System.ServiceModel;
using System.Collections.Generic;
using MyProject.Entities.Concrete;
namespace MyProject.Business.Abstract
{
[ServiceContract]
public partial interface ICategoriesService
{
[OperationContract]
List<Categories> GetAll();
[OperationContract]
Categories Get(int CategoryID);
}
}

// IOrdersService.cs
using System;
using System.ServiceModel;
using System.Collections.Generic;
using MyProject.Entities.Concrete;
namespace MyProject.Business.Abstract
{
[ServiceContract]
public partial interface IOrdersService
{
[OperationContract]
List<Orders> GetAll();
[OperationContract]
Orders Get(int OrderID);
}
}