| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Tiger.Api.iBiz; |
| | | using System.Net; |
| | | using System.Reflection; |
| | | using Swifter.Tools; |
| | | |
| | | namespace Tiger.Api.Controllers.Test |
| | | { |
| | |
| | | public IActionResult GetDBSchemaAsync() |
| | | { |
| | | return Ok(Biz.Db.DbMaintenance.GetTableInfoList()); |
| | | } |
| | | |
| | | [HttpGet] |
| | | public IActionResult GetEntitys(string AssemblyName, string NameSpace) |
| | | { |
| | | Assembly assembly = Assembly.Load(AssemblyName); |
| | | Type[] types = assembly.GetTypes(); |
| | | var entitys = types.Where(q => q.GetInterfaces().Contains(typeof(iEntity)) && q.IsClass).ToList(); |
| | | var data = entitys.Select(q => new |
| | | { |
| | | q.Namespace, |
| | | q.FullName, |
| | | Properties = q.GetProperties().Select(p => new { p.Name, Type = p.PropertyType.Name }).ToList() |
| | | }); |
| | | return Ok(data); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | //Biz.Db.Fastest<WMS_WAREHOUSE>().BulkUpdate(data, new string[] { "ID" }, new string[] { "UPDATE_TIME", "UPDATE_USER" }); |
| | | //Biz.Db.Insertable(data, "Interface").ExecuteCommand(); |
| | | |
| | | //var root = new SugarParameter("root", "system01"); |
| | | //var dt = Biz.Db.Ado.UseStoredProcedure().GetDataTable("PKG_SYS_GET_MENU", root);//返回dt |
| | | //var data = Biz.Db.Ado.UseStoredProcedure().SqlQuery<SYS_MENU>("PKG_SYS_GET_MENU", root);//返回List |
| | | var root = new SugarParameter("root", "system01"); |
| | | var dt = Biz.Db.Ado.UseStoredProcedure().GetDataTable("SP_SYS_GET_MENU", root);//返回dt |
| | | var data = Biz.Db.Ado.UseStoredProcedure().SqlQuery<SYS_MENU>("SP_SYS_GET_MENU", root);//返回List |
| | | ; |
| | | //var data = Biz.Db.Queryable<BIZ_SRM_DLVY>() |
| | | // .IncludesAllFirstLayer() |
| | |
| | | //{ |
| | | // throw dbTran.ErrorException; |
| | | //} |
| | | return Ok(""); |
| | | return Ok(data); |
| | | } |
| | | /// <summary> |
| | | /// |