netcore-blueprint 0.0.63 → 0.0.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,20 @@
1
1
  using Host.API.Extensions;
2
+ using Microsoft.AspNetCore.Mvc.ApplicationParts;
2
3
 
3
4
  var builder = WebApplication.CreateBuilder(args);
4
5
 
5
6
  // 1. Central MVC
6
- var mvcBuilder = builder.Services.AddControllers();
7
+ var mvcBuilder = builder.Services
8
+ .AddControllers()
9
+ .ConfigureApplicationPartManager(manager =>
10
+ {
11
+ // 🔥 Clear toàn bộ auto-discovered parts
12
+ manager.ApplicationParts.Clear();
13
+
14
+ // 🔐 Chỉ add Host.API assembly
15
+ manager.ApplicationParts.Add(
16
+ new AssemblyPart(typeof(Program).Assembly));
17
+ });
7
18
 
8
19
  // Core
9
20
  builder.Services.AddApiCore(builder.Configuration);
package/README.md CHANGED
@@ -3,21 +3,20 @@ How to make a blueprint
3
3
  - npm uninstall -g netcore-blueprint
4
4
  - npm install -g netcore-blueprint
5
5
  - npm list -g netcore-blueprint
6
- - create-app <AppName> (Sửa connection string)
7
- - create-module <ModuleName> <EntityName>
8
- - copy-module <CopiedModuleName> (Run in the folder Modules right outside the solution) (copy-module <CopiedModuleName> --force)
6
+ - create-app AppName (Sửa connection string)
7
+ - create-module ModuleName EntityName
8
+ - copy-module CopiedModuleName (Run in the folder Modules right outside the solution) (copy-module CopiedModuleName --force)
9
9
 
10
10
  2. Tạo mới 1 module
11
- - Copy lại thư mục item để thêm module mới
12
- - Sửa lại tên toàn bộ namespace
13
- - Thêm ref vào Host.API
14
- - Bật tắt các module không cần thiết
15
- - Bật tắt hoặc chuyển đổi DB nếu cần
11
+ - create-module ModuleName EntityName
12
+ - copy-module CopiedModuleName (Chỉnh sửa, sau đó cho vào thư mục cùng cấp với BlueprintTemplate)
13
+ - Thêm ref vào Host.API trong appsettings, mục "Modules" (Bật tắt qua đây)
16
14
 
17
15
  3. Bỏ module
18
16
  - Xóa module
19
17
  - Bỏ <Folder Name="/Modules/ProductModule/"> ở MyBlueprint.slnx
20
18
  - Bỏ ProjectReference ở Host.API.csproj
19
+ - Bỏ ref ở Host.API trong appsettings
21
20
 
22
21
  4. Mock Data
23
22
  - Tools → NuGet Package Manager → Package Manager Console
@@ -27,5 +26,4 @@ How to make a blueprint
27
26
  - Update-Database
28
27
 
29
28
  5. Todos
30
- - Plug/ Unplug module (config)
31
29
  - Plug/ Unplug database provider (config)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "netcore-blueprint",
3
- "version": "0.0.63",
3
+ "version": "0.0.64",
4
4
  "description": "A custom project blueprint",
5
5
  "main": "create.js",
6
6
  "bin": {