Skip to content

Commit

Permalink
Model is created, linked with database
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingafen committed Apr 1, 2022
1 parent 2bd2c1b commit dc6071e
Show file tree
Hide file tree
Showing 52 changed files with 1,191 additions and 449 deletions.
13 changes: 13 additions & 0 deletions .idea/.idea.StarWarsKb/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/.idea.StarWarsKb/.idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/.idea.StarWarsKb/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/.idea.StarWarsKb/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.StarWarsKb/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.StarWarsKb/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 25 additions & 1 deletion StarWarsKb.Back/Controllers/CharactersController.cs
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@

using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using StarWarsKb.Back.Model;
using StarWarsKb.Infrastructure.Model;

namespace StarWarsKb.Back.Controllers
{
[ApiController]
[Route("[controller]")]
public class CharactersController : ControllerBase
{
private readonly ICharactersRepository _charactersRepository;

public CharactersController(ICharactersRepository charactersRepository)
{
_charactersRepository = charactersRepository;
}

[HttpGet]
public IList<Character> Get() => _charactersRepository.GetAll();

[HttpGet("{id}")]
public Character Get(int id) => _charactersRepository.GetById(id);
}
}
39 changes: 0 additions & 39 deletions StarWarsKb.Back/Controllers/WeatherForecastController.cs

This file was deleted.

189 changes: 189 additions & 0 deletions StarWarsKb.Back/Migrations/20220401065936_InitialMigration.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dc6071e

Please sign in to comment.