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