Code Monkey home page Code Monkey logo

kashilog-on-containers's Introduction

kashilog-on-containers

Technology Stacks

  • C# 12
  • .NET 8
  • SQLServer

Infrastructures

CI / CD

  • Github Actions

SCM

  • Github

How To Local Dev

この項では、Local開発を行う上で、各種リソースをセットアップする方法を説明する。

Use MSSQL On Docker

databases フォルダのStartupSqlserver.batをダブルクリックする。

Use Redis On Docker

redis フォルダのRunRedis.batをダブルクリックする。

Use Mail Fake Server

mailフォルダのRunMail.batをダブルクリックする。

Fake Serverへの接続情報

server:
=> localhost ※ Docker To Dockerの場合はHost.Docker.Internal
port:
=> 2197

mail boxへの接続

http://127.0.0.1:1592/ ※ブラウザでアクセス可能

dotnet build -c Release --property:AutoSwaggerToFile=true

Use Image Mock Server

image-mock-server\dummyフォルダのStartupImageMoqServer.batをダブルクリックする。

Startup Moq Api(他Serviceとの統合テスト時等に利用する用途)

事前条件

KashilogのSQLServerを起動させておくこと。

Startup Kashilog Moq Api

StartupTestApiKashilogContainer.batをダブルクリックする。

Update swagger.json

下記commandを叩くことで生成可能。
dotnet build -c Release --property:AutoSwaggerToFile=true

Generate ApiClient Samples

ApiClientExamples フォルダのGenerateExampleApiClient.batをダブルクリックする。
Examples.ApiClient.Kashilogに.NET8のApiClientが生成される。

using EF Core Tools

この項では、EF Coreでのリバースエンジニアリングを行う方法を説明する。

EF Core ToolsのUpdate

VisualStudio2022のパッケージマネージャーコンソールウインドウで、以下のコマンドを実行する。
dotnet tool update -g dotnet-ef
※ 基本的には EF Core Scaffold の直前にかけておくと良い。

EF Core Scaffold

VisualStudio2022のパッケージマネージャーコンソールウインドウで、Scaffoldを行いたいProjectを既定のプロジェクトに設定した状態で以下のコマンドを実行する。
Scaffold-DbContext "Server=localhost,15331;Database=kashilogdb;user id=sa;password=h0geFuga;TrustServerCertificate=True;" Microsoft.EntityFrameworkCore.SqlServer -StartupProject Database.Kashilog -OutputDir EntityDataModels -ContextDir DbContexts -Force -NoOnConfiguring -Context KashilogContext

kashilog-on-containers's People

Contributors

creatiovitae avatar dependabot[bot] avatar github-actions[bot] avatar

Watchers

 avatar

kashilog-on-containers's Issues

productの仕様

productの仕様

LineupIdのMaxを取る必要がある。
revisionも同時に検査が必要。

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.