多租户应用程序设计
This commit is contained in:
1 parent
dbabaaadba
commit
49f2796cc2
24 files changed
+116
-25
No files matched your search
+14
-1
@@ -1,4 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
// Copyright (c) HelloShop Corporation. All rights reserved.
|
||||
// See the license file in the project root for more information.
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using MultiTenancySample.FieldIsolationService.Entities;
|
||||
using MultiTenancySample.FieldIsolationService.EntityFrameworks;
|
||||
@@ -23,5 +26,15 @@ namespace MultiTenancySample.FieldIsolationService.Controllers
|
||||
|
||||
return Ok(products);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> CreateProduct(Product product)
|
||||
{
|
||||
await _dbContext.AddAsync(product);
|
||||
|
||||
await _dbContext.SaveChangesAsync();
|
||||
|
||||
return Ok(product);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user