Info
Version: | 1.4.1 |
Author(s): | Igor Evdokimov |
Last Update: | Friday, January 10, 2020 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/Core.ORM.Procedures.Component |
Install
Install-Package Core.ORM.Procedures.Component
dotnet add package Core.ORM.Procedures.Component
paket add Core.ORM.Procedures.Component
Core.ORM.Procedures.Component Download (Unzip the "nupkg" after downloading)
Dependencies
- Dapper(>= 2.0.30)
- Microsoft.AspNetCore.Hosting.Abstractions(>= 2.2.0)
- Microsoft.Extensions.Configuration(>= 3.1.0)
- Microsoft.Extensions.Configuration.Json(>= 3.1.0)
- Microsoft.Extensions.DependencyInjection.Abstractions(>= 3.1.0)
- Newtonsoft.Json(>= 12.0.3)
- System.Data.SqlClient(>= 4.8.0)
- log4net(>= 2.0.8)
PM> dotnet [Полный путь к компоненте Core.ORM.Procedures.Component.dll] [Имя подключения к БД в конфигурационном файле] [Тип получаемых объектов ("procedure" или "table")] [Путь к корню проекта в котором необходимы модели] [Процедура1 Процедура2]
For Example:
// Data for create Tables models and Direct file
// string[] str = new string[] { "PRIZDB", "C:\\Project_Admin\\Core.ORM.Procedures\\Core.ORM.Procedures\\Core.ORM.Procedures.Web.Test", "table", "AccessMatrix", "AccessLevel", "AccessMatrixRole" };
// Data for create Procedures models and Direct file
// string[] str = new string[] { "PRIZDB", "C:\\Project_Admin\\Core.ORM.Procedures\\Core.ORM.Procedures\\Core.ORM.Procedures.Web.Test", "procedure", "GetFormIdBySysName", "AddActivityOKPD", "GetFinValuePoint", "AddOIV", "LoadReport" };
// Create Process
var s = new Core.ORM.Procedures.Component.Program(str);
//var res = new Models.PRIZDB.Operations.PRIZDBEntities(configuration).GetFinValuePoint("550-966", null, null);//Error sql (Input/Output)(Error)
//var res = new Models.PRIZDB.Operations.PRIZDBEntities(configuration).total_GetBooleanList(); // List without input parametrs (Success)
//var res = new Models.PRIZDB.Operations.PRIZDBEntities(configuration).uniwp_GetChReqListForUser("HQ\\EvdokimovIP"); //With parameter (Input)(Success)
//var res = new Models.PRIZDB.Operations.PRIZDBEntities(configuration).GetFormIdBySysName("Contract2014", null); // With OUTPUT Params
//var res = new Models.PRIZDB.Operations.PRIZDBEntities(configuration).AccessLevel(); // Execute Table without Parameters
//var res = new Models.PRIZDB.Operations.PRIZDBEntities(configuration).AccessLevel(1,null,null,null,null,null); // Execute Table with Parameters
public IConfiguration Configuration { get; }
var s = new Procedures.Component.Controllers.DbContext("PRIZDB", configuration);
s.OnModelCreating(new string[] { "SetLog", "cntr_ViewDeterminationMethodList", "REPORT_PlanPurchaseNewForm", "SP_GetAdditionalConditions", "GetKBKTargetItemAsur" });.