Skip to content

shihabmi7/AnimationMovieAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnimationMovieAPI

A restful web api with Asp.net core 6 & Entity Framework

To run this you need to create Database name MovieContext & correspondin table as below.

SQL Command to create database & table.

  • Create database MovieContext;

  • use MovieContext;

  • CREATE TABLE Movies (Id int, Title varchar(100), Genre VARCHAR(100), ReleaseDate DateTime);

  • INSERT INTO Movies VALUES('2','Life is Cool','lIGFEsTYLE','2001/06/02'); // add some rows

  • SELECT * From Movies;

See the picture is the output after it's runs

AnimationMovieApi

For local database, you need to update your connection strings in appsettings.json like below:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    // this should be your database name & your own db connection string. 
    "MovieContext": "Server=localhost\\SQLEXPRESS;Database=MovieContext;Trusted_Connection=True;Encrypt=False"
  }
}
// For local development, the ASP.NET Core configuration system reads the connection string from the appsettings.json file.```

About

A restful web api with Asp.net core 6

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages