GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ayanNullPointerEx/EfExample

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
Database
Database
 
 
Domain
Domain
 
 
.gitignore
.gitignore
 
 
EFExample.csproj
EFExample.csproj
 
 
Program.cs
Program.cs
 
 
README.md
README.md
 
 
img.jpg
img.jpg
 
 

Repository files navigation

Entity Framework Introduction

Basic Program to -

  • Connect to Postgres DB
  • Code-First approach in creating Table
  • Read/Write operation to DB

Version -

  • version 1.0.0 - Basic EF Framework
  • version 2.0.0 - Adding Seed Data

Steps -

  1. Run postgres DB n check via pgAdmin UI
        docker run --name postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres:latest
        docker run -p 80:80 -e '[email protected]' -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' -d dpage/pgadmin4

Note: Command to get Database Hostname used in pgAdmin

 docker inspect <postgres-dockerContainerId> | grep IPAddress
  1. Install EF Framework (if not already installed)
        dotnet tool install --global dotnet-ef
  1. Create Migration script using -
        dotnet ef migrations add InitialState

        dotnet ef database update
  1. Run the program.

Output -

img.jpg

About

No description or website provided.

Topics

csharpentity-frameworkentity-framework-code-firstentity-framework-coreexample-projectstarter-kit

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.