Ejemplo n.º 1
0
 /// <summary>
 /// 生成 IService 层
 /// </summary>
 /// <param name="myContext"></param>
 /// <returns></returns>
 public static bool CreateIServices(MyContext myContext)
 {
     try
     {
         myContext.Create_IServices_ClassFileByDBTalbe($@"C:\my-file\Blog.Core.IServices", "Blog.Core.IServices", new string[] { "Module" }, "");
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 生成 IService 层
 /// </summary>
 /// <param name="myContext">上下文</param>
 /// <param name="tableNames">数据库表名数组,默认空,生成所有表</param>
 /// <returns></returns>
 public static bool CreateIServices(MyContext myContext, string[] tableNames = null)
 {
     try
     {
         myContext.Create_IServices_ClassFileByDBTalbe($@"C:\my-file\Blog.Core.IServices", "Blog.Core.IServices", tableNames, "");
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }