Giter Club home page Giter Club logo

netcorekit's People

Contributors

thangchung avatar thinhnotes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netcorekit's Issues

Add avro on the top of Kafka for decoupling message schema

Good architecture

Support simple authorize with policy

Just like https://github.com/EduardoPires/EquinoxProject/blob/master/src/Equinox.WebApi/Startup.cs#L61, but we will put it into the configuration (consider using feature toggle), then just do something like

appsettings.json

"Features": {
	"Authz": {
		"CanWriteCustomerData": {
			"Customers": "Write"
		},
		"CanRemoveCustomerData": {
			"Customers": "Remove"
		}
	}	
}

Then in the CustomerController.cs

[Authorize]
public class CustomerController : ApiController
{
	[HttpPost]
    [Authorize(Policy = "CanWriteCustomerData")]
    [Route("customer-management")]
    public IActionResult Post([FromBody]CustomerViewModel customerViewModel)
    {
		
	}
}

Kafka for service bus

Dapper consideration

Because legacy system might only has Store Procedure which contains all business logic there so that we need to have a way to work effectively with this kind of work. Dapper is the best choice due to the stable and flexible when working with this scenario.

Ref:

Error when Build sample Todoapi contianer

Follow the Guide Step by Step

When buile image vndg/todoapi, Error occures

Step 13/20 : RUN dotnet restore -nowarn:msb3202,nu1503
 ---> Running in 446fcef1b174
MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file.
The command '/bin/sh -c dotnet restore -nowarn:msb3202,nu1503' returned a non-zero code: 1
Step 14/20 : RUN dotnet build --no-restore -c Release -o /app
 ---> Running in 039bbdd99b2b
Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file.
The command '/bin/sh -c dotnet build --no-restore -c Release -o /app' returned a non-zero code: 1

After editing sample/Todoapi/Dockerfile by adding detail project name to restore/build/publish cmds

FROM microsoft/dotnet:2.1.5-aspnetcore-runtime-alpine AS base
WORKDIR /app

ARG service_version
ENV SERVICE_VERSION ${service_version:-0.0.1}

ARG api_version
ENV API_VERSION ${api_version:-1.0}

ENV ASPNETCORE_URLS http://+:80
EXPOSE 80

FROM microsoft/dotnet:2.1.403-sdk-alpine AS build
WORKDIR .
COPY . .

WORKDIR /samples/TodoApi

RUN dotnet restore NetCoreKit.Samples.TodoApi.csproj -nowarn:msb3202,nu1503
RUN dotnet build NetCoreKit.Samples.TodoApi.csproj --no-restore -c Release -o /app

FROM build AS publish
RUN dotnet publish NetCoreKit.Samples.TodoApi.csproj--no-restore -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "NetCoreKit.Samples.TodoApi.dll"]

build complete successfully.

Add multiple dbcontext

Is it possible to add multiple EFcore DB context so that I can use two different SQL databases? I tried it by making some adjustments in the code but it is not working. Can anyone share the code snippet about how to handle multiple database contexts? I tried it but the second dbcontext overriding the first dbcontext.

FYI: I have two databases and both are on the SQL Server but on different servers.

"db1": "Server=server1;Database=db1;User Id=userid;Password=password;MultipleActiveResultSets=True;",
"db2": "Server=server2;Database=db2;User Id=userid;Password=password;MultipleActiveResultSets=True;"

Route debug in aspnet 2.2

At the moment, we hit some issues when tried to run the app in container. We need some way to debug the route in aspnetcore 2.2 apps. Almost old debug libs were out of date.

Reference:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.