| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Tiger.Api.iBiz; |
| | | using System.Net; |
| | | using System.Reflection; |
| | | using Swifter.Tools; |
| | | |
| | | namespace Tiger.Api.Controllers.Test |
| | | { |
| | |
| | | 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> |
| | | /// GetAsync |
| | | /// </summary> |