I´m developing a database access layer to call functions inside a package in a Oracle server. What is the best way to do this?
I think that creating a service class with return classes and methods to mapping all the functions inside the packge is the best I cand do. Here is my first approach:
public class ReturnFunctionA
{
public string ValueA { get; set; }
public int ValueB { get; set; }
}
public class ReturnFunction2
{
public string ValueA { get; set; }
}
public class SQLPackageService
{
public ReturnFuncionA Function1(string param1)
{
var retorno = new ReturnFuncionA();
//DO THE STUFF
return retorno;
}
public ReturnFuncion2 Function2(string param1, string param2)
{
var retorno = new ReturnFuncion2();
//DO THE STUFF
return retorno;
}
}
The concept (name) of the package class is a service?
Aucun commentaire:
Enregistrer un commentaire