Move webapi to sub folder
This commit is contained in:
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
@@ -9,9 +9,9 @@
|
|||||||
"type": "coreclr",
|
"type": "coreclr",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "build",
|
||||||
"program": "${workspaceFolder}/bin/Debug/net7.0/GerbilManager.dll",
|
"program": "${workspaceFolder}GerbilManagerWebAPI/bin/Debug/net7.0/GerbilManager.dll",
|
||||||
"args": [],
|
"args": [],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}/GerbilManagerWebAPI",
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"serverReadyAction": {
|
"serverReadyAction": {
|
||||||
"action": "openExternally",
|
"action": "openExternally",
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
},
|
},
|
||||||
"sourceFileMap": {
|
"sourceFileMap": {
|
||||||
"/Views": "${workspaceFolder}/Views"
|
"/Views": "${workspaceFolder}/GerbilManagerWebAPI/Views"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.5.002.0
|
VisualStudioVersion = 17.5.002.0
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GerbilManager", "GerbilManager.csproj", "{48875578-7112-4F6F-A4C0-F1E7637B513D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GerbilManager", "GerbilManagerWebAPI/GerbilManager.csproj", "{48875578-7112-4F6F-A4C0-F1E7637B513D}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
public class ApplicationContext : DbContext
|
public class ApplicationContext : DbContext
|
||||||
{
|
{
|
||||||
public ApplicationContext(DbContextOptions options)
|
public ApplicationContext(DbContextOptions options)
|
||||||
:base(options)
|
:base(options)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
public DbSet<Gerbil> Gerbils { get; set; }
|
public DbSet<Gerbil> Gerbils { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,91 +1,91 @@
|
|||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
using GerbilManager.Repositories;
|
using GerbilManager.Repositories;
|
||||||
using GerbilManager.Dtos;
|
using GerbilManager.Dtos;
|
||||||
|
|
||||||
using GerbilManager.Converter;
|
using GerbilManager.Converter;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
namespace GerbilManager.Controllers
|
namespace GerbilManager.Controllers
|
||||||
{
|
{
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("breeders")]
|
[Route("breeders")]
|
||||||
public class BreederController : ControllerBase
|
public class BreederController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly IGerbilRepository gerbilrepository;
|
private readonly IGerbilRepository gerbilrepository;
|
||||||
private readonly IBreederRepository repository;
|
private readonly IBreederRepository repository;
|
||||||
private readonly ILitterRepository litterRepository;
|
private readonly ILitterRepository litterRepository;
|
||||||
|
|
||||||
public BreederController(IBreederRepository repo)
|
public BreederController(IBreederRepository repo)
|
||||||
{
|
{
|
||||||
this.repository = repo;
|
this.repository = repo;
|
||||||
}
|
}
|
||||||
|
|
||||||
//GET /gerbils
|
//GET /gerbils
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<BreederDto> GetBreeders()
|
public IEnumerable<BreederDto> GetBreeders()
|
||||||
{
|
{
|
||||||
var items = repository.GetBreeders().Select( breeder => breeder.AsDto());
|
var items = repository.GetBreeders().Select( breeder => breeder.AsDto());
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
//GET /gerbils
|
//GET /gerbils
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
public ActionResult<BreederDto> GetBreeder(Guid id)
|
public ActionResult<BreederDto> GetBreeder(Guid id)
|
||||||
{
|
{
|
||||||
var item = repository.GetBreeder(id).AsDto();
|
var item = repository.GetBreeder(id).AsDto();
|
||||||
|
|
||||||
if(item is null)
|
if(item is null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost()]
|
[HttpPost()]
|
||||||
public ActionResult<BreederDto> CreateBreeder(CreateBreederDto dto)
|
public ActionResult<BreederDto> CreateBreeder(CreateBreederDto dto)
|
||||||
{
|
{
|
||||||
Breeder breeder = new Breeder{
|
Breeder breeder = new Breeder{
|
||||||
Id = Guid.NewGuid(),
|
Id = Guid.NewGuid(),
|
||||||
Name = dto.Name,
|
Name = dto.Name,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.repository.CreateBreeder(breeder);
|
this.repository.CreateBreeder(breeder);
|
||||||
|
|
||||||
return CreatedAtAction(nameof(GetBreeder), new { id = breeder.Id}, breeder.AsDto());
|
return CreatedAtAction(nameof(GetBreeder), new { id = breeder.Id}, breeder.AsDto());
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPut("{id}")]
|
[HttpPut("{id}")]
|
||||||
public ActionResult UpdateBreeder(Guid id, UpdateBreederDto breederDto)
|
public ActionResult UpdateBreeder(Guid id, UpdateBreederDto breederDto)
|
||||||
{
|
{
|
||||||
var existingItem = repository.GetBreeder(id);
|
var existingItem = repository.GetBreeder(id);
|
||||||
if(existingItem is null)
|
if(existingItem is null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
Breeder updatedBreeder = existingItem with{
|
Breeder updatedBreeder = existingItem with{
|
||||||
Name = breederDto.Name
|
Name = breederDto.Name
|
||||||
};
|
};
|
||||||
|
|
||||||
repository.UpdateBreeder(updatedBreeder);
|
repository.UpdateBreeder(updatedBreeder);
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpDelete("{id}")]
|
[HttpDelete("{id}")]
|
||||||
public ActionResult DeleteBreeder(Guid id)
|
public ActionResult DeleteBreeder(Guid id)
|
||||||
{
|
{
|
||||||
var existingLitter = repository.GetBreeder(id);
|
var existingLitter = repository.GetBreeder(id);
|
||||||
|
|
||||||
if(existingLitter is null)
|
if(existingLitter is null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
repository.DeleteBreeder(existingLitter);
|
repository.DeleteBreeder(existingLitter);
|
||||||
|
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,95 +1,95 @@
|
|||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
using GerbilManager.Repositories;
|
using GerbilManager.Repositories;
|
||||||
using GerbilManager.Dtos;
|
using GerbilManager.Dtos;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using GerbilManager.Converter;
|
using GerbilManager.Converter;
|
||||||
|
|
||||||
namespace GerbilManager.Controllers
|
namespace GerbilManager.Controllers
|
||||||
{
|
{
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("gerbils")]
|
[Route("gerbils")]
|
||||||
public class GerbilsController : ControllerBase
|
public class GerbilsController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly IGerbilRepository repository;
|
private readonly IGerbilRepository repository;
|
||||||
private readonly IBreederRepository breederRepository;
|
private readonly IBreederRepository breederRepository;
|
||||||
private readonly ILitterRepository litterRepository;
|
private readonly ILitterRepository litterRepository;
|
||||||
|
|
||||||
public GerbilsController(IGerbilRepository repo)
|
public GerbilsController(IGerbilRepository repo)
|
||||||
{
|
{
|
||||||
this.repository = repo;
|
this.repository = repo;
|
||||||
}
|
}
|
||||||
|
|
||||||
//GET /gerbils
|
//GET /gerbils
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<GerbilDto> GetGerbils()
|
public IEnumerable<GerbilDto> GetGerbils()
|
||||||
{
|
{
|
||||||
var items = repository.GetGerbils().Select( gerbil => gerbil.AsDto());
|
var items = repository.GetGerbils().Select( gerbil => gerbil.AsDto());
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
//GET /gerbils
|
//GET /gerbils
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
public ActionResult<GerbilDto> GetGerbil(Guid id)
|
public ActionResult<GerbilDto> GetGerbil(Guid id)
|
||||||
{
|
{
|
||||||
var item = repository.GetGerbil(id).AsDto();
|
var item = repository.GetGerbil(id).AsDto();
|
||||||
|
|
||||||
if(item is null)
|
if(item is null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost()]
|
[HttpPost()]
|
||||||
public ActionResult<GerbilDto> CreateGerbil(CreateGerbilDto dto)
|
public ActionResult<GerbilDto> CreateGerbil(CreateGerbilDto dto)
|
||||||
{
|
{
|
||||||
Gerbil gerbil = new Gerbil{
|
Gerbil gerbil = new Gerbil{
|
||||||
Id = Guid.NewGuid(),
|
Id = Guid.NewGuid(),
|
||||||
Name = dto.Name,
|
Name = dto.Name,
|
||||||
Breeder = breederRepository.GetBreeder(dto.Breeder),
|
Breeder = breederRepository.GetBreeder(dto.Breeder),
|
||||||
Litter = litterRepository.GetLitter(dto.Litter),
|
Litter = litterRepository.GetLitter(dto.Litter),
|
||||||
Gender = (Gender) (int) dto.Gender
|
Gender = (Gender) (int) dto.Gender
|
||||||
};
|
};
|
||||||
|
|
||||||
this.repository.CreateGerbil(gerbil);
|
this.repository.CreateGerbil(gerbil);
|
||||||
|
|
||||||
return CreatedAtAction(nameof(GetGerbil), new { id = gerbil.Id}, gerbil.AsDto());
|
return CreatedAtAction(nameof(GetGerbil), new { id = gerbil.Id}, gerbil.AsDto());
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPut("{id}")]
|
[HttpPut("{id}")]
|
||||||
public ActionResult UpdateGerbil(Guid id, UpdateGerbilDto gerbilDto)
|
public ActionResult UpdateGerbil(Guid id, UpdateGerbilDto gerbilDto)
|
||||||
{
|
{
|
||||||
var existingItem = repository.GetGerbil(id);
|
var existingItem = repository.GetGerbil(id);
|
||||||
if(existingItem is null)
|
if(existingItem is null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
Gerbil updatedGerbil = existingItem with{
|
Gerbil updatedGerbil = existingItem with{
|
||||||
Breeder = breederRepository.GetBreeder(gerbilDto.Breeder.Id),
|
Breeder = breederRepository.GetBreeder(gerbilDto.Breeder.Id),
|
||||||
Litter = litterRepository.GetLitter(gerbilDto.Litter.Id),
|
Litter = litterRepository.GetLitter(gerbilDto.Litter.Id),
|
||||||
Gender = (Gender) (int) gerbilDto.Gender,
|
Gender = (Gender) (int) gerbilDto.Gender,
|
||||||
Name = gerbilDto.Name
|
Name = gerbilDto.Name
|
||||||
};
|
};
|
||||||
|
|
||||||
repository.UpdateGerbil(updatedGerbil);
|
repository.UpdateGerbil(updatedGerbil);
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpDelete("{id}")]
|
[HttpDelete("{id}")]
|
||||||
public ActionResult DeleteGerbil(Guid id)
|
public ActionResult DeleteGerbil(Guid id)
|
||||||
{
|
{
|
||||||
var existingGerbil = repository.GetGerbil(id);
|
var existingGerbil = repository.GetGerbil(id);
|
||||||
|
|
||||||
if(existingGerbil is null)
|
if(existingGerbil is null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
repository.DeleteGerbil(existingGerbil);
|
repository.DeleteGerbil(existingGerbil);
|
||||||
|
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,99 +1,99 @@
|
|||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
using GerbilManager.Repositories;
|
using GerbilManager.Repositories;
|
||||||
using GerbilManager.Dtos;
|
using GerbilManager.Dtos;
|
||||||
|
|
||||||
using GerbilManager.Converter;
|
using GerbilManager.Converter;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
namespace GerbilManager.Controllers
|
namespace GerbilManager.Controllers
|
||||||
{
|
{
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Route("litters")]
|
[Route("litters")]
|
||||||
public class LittersController : ControllerBase
|
public class LittersController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly IGerbilRepository gerbilrepository;
|
private readonly IGerbilRepository gerbilrepository;
|
||||||
private readonly IBreederRepository breederRepository;
|
private readonly IBreederRepository breederRepository;
|
||||||
private readonly ILitterRepository repository;
|
private readonly ILitterRepository repository;
|
||||||
|
|
||||||
public LittersController(ILitterRepository repo)
|
public LittersController(ILitterRepository repo)
|
||||||
{
|
{
|
||||||
this.repository = repo;
|
this.repository = repo;
|
||||||
}
|
}
|
||||||
|
|
||||||
//GET /gerbils
|
//GET /gerbils
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IEnumerable<LitterDto> GetLitters()
|
public IEnumerable<LitterDto> GetLitters()
|
||||||
{
|
{
|
||||||
var items = repository.GetLitters().Select( litter => litter.AsDto());
|
var items = repository.GetLitters().Select( litter => litter.AsDto());
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
//GET /gerbils
|
//GET /gerbils
|
||||||
[HttpGet("{id}")]
|
[HttpGet("{id}")]
|
||||||
public ActionResult<LitterDto> GetLitter(Guid id)
|
public ActionResult<LitterDto> GetLitter(Guid id)
|
||||||
{
|
{
|
||||||
var item = repository.GetLitter(id).AsDto();
|
var item = repository.GetLitter(id).AsDto();
|
||||||
|
|
||||||
if(item is null)
|
if(item is null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost()]
|
[HttpPost()]
|
||||||
public ActionResult<LitterDto> CreateLitter(CreateLitterDto dto)
|
public ActionResult<LitterDto> CreateLitter(CreateLitterDto dto)
|
||||||
{
|
{
|
||||||
Litter litter = new Litter{
|
Litter litter = new Litter{
|
||||||
Id = Guid.NewGuid(),
|
Id = Guid.NewGuid(),
|
||||||
Date = dto.Date,
|
Date = dto.Date,
|
||||||
Father = gerbilrepository.GetGerbil(dto.Father),
|
Father = gerbilrepository.GetGerbil(dto.Father),
|
||||||
Mother = gerbilrepository.GetGerbil(dto.Mother),
|
Mother = gerbilrepository.GetGerbil(dto.Mother),
|
||||||
Name = dto.Name,
|
Name = dto.Name,
|
||||||
Strength = dto.Strength
|
Strength = dto.Strength
|
||||||
};
|
};
|
||||||
|
|
||||||
this.repository.CreateLitter(litter);
|
this.repository.CreateLitter(litter);
|
||||||
|
|
||||||
return CreatedAtAction(nameof(GetLitter), new { id = litter.Id}, litter.AsDto());
|
return CreatedAtAction(nameof(GetLitter), new { id = litter.Id}, litter.AsDto());
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPut("{id}")]
|
[HttpPut("{id}")]
|
||||||
public ActionResult UpdateLitter(Guid id, UpdateLitterDto litterDto)
|
public ActionResult UpdateLitter(Guid id, UpdateLitterDto litterDto)
|
||||||
{
|
{
|
||||||
var existingItem = repository.GetLitter(id);
|
var existingItem = repository.GetLitter(id);
|
||||||
if(existingItem is null)
|
if(existingItem is null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
Litter updatedLitter = existingItem with{
|
Litter updatedLitter = existingItem with{
|
||||||
Date = litterDto.Date,
|
Date = litterDto.Date,
|
||||||
Strength = litterDto.Strength,
|
Strength = litterDto.Strength,
|
||||||
Father = gerbilrepository.GetGerbil(litterDto.Father),
|
Father = gerbilrepository.GetGerbil(litterDto.Father),
|
||||||
Mother = gerbilrepository.GetGerbil(litterDto.Mother),
|
Mother = gerbilrepository.GetGerbil(litterDto.Mother),
|
||||||
Name = litterDto.Name
|
Name = litterDto.Name
|
||||||
};
|
};
|
||||||
|
|
||||||
repository.UpdateLitter(updatedLitter);
|
repository.UpdateLitter(updatedLitter);
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpDelete("{id}")]
|
[HttpDelete("{id}")]
|
||||||
public ActionResult DeleteLitter(Guid id)
|
public ActionResult DeleteLitter(Guid id)
|
||||||
{
|
{
|
||||||
var existingLitter = repository.GetLitter(id);
|
var existingLitter = repository.GetLitter(id);
|
||||||
|
|
||||||
if(existingLitter is null)
|
if(existingLitter is null)
|
||||||
{
|
{
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
repository.DeleteLitter(existingLitter);
|
repository.DeleteLitter(existingLitter);
|
||||||
|
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
using GerbilManager.Dtos;
|
using GerbilManager.Dtos;
|
||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
|
|
||||||
namespace GerbilManager.Converter
|
namespace GerbilManager.Converter
|
||||||
{
|
{
|
||||||
public static class BreederConverterExtension
|
public static class BreederConverterExtension
|
||||||
{
|
{
|
||||||
public static BreederDto AsDto(this Breeder breeder)
|
public static BreederDto AsDto(this Breeder breeder)
|
||||||
{
|
{
|
||||||
return new BreederDto{
|
return new BreederDto{
|
||||||
Id = breeder.Id,
|
Id = breeder.Id,
|
||||||
Name = breeder.Name
|
Name = breeder.Name
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
using GerbilManager.Dtos;
|
using GerbilManager.Dtos;
|
||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
|
|
||||||
namespace GerbilManager.Converter
|
namespace GerbilManager.Converter
|
||||||
{
|
{
|
||||||
public static class GerbilConverterExtension
|
public static class GerbilConverterExtension
|
||||||
{
|
{
|
||||||
public static GerbilDto AsDto(this Gerbil gerbil)
|
public static GerbilDto AsDto(this Gerbil gerbil)
|
||||||
{
|
{
|
||||||
return new GerbilDto{
|
return new GerbilDto{
|
||||||
Breeder = gerbil.Breeder.AsDto(),
|
Breeder = gerbil.Breeder.AsDto(),
|
||||||
Gender = (GenderDto) ((int) gerbil.Gender),
|
Gender = (GenderDto) ((int) gerbil.Gender),
|
||||||
Name = gerbil.Name,
|
Name = gerbil.Name,
|
||||||
Litter = gerbil.Litter.AsDto()
|
Litter = gerbil.Litter.AsDto()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,21 +1,21 @@
|
|||||||
using GerbilManager.Dtos;
|
using GerbilManager.Dtos;
|
||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
|
|
||||||
namespace GerbilManager.Converter
|
namespace GerbilManager.Converter
|
||||||
{
|
{
|
||||||
public static class LitterConverterExtension
|
public static class LitterConverterExtension
|
||||||
{
|
{
|
||||||
public static LitterDto AsDto(this Litter litter)
|
public static LitterDto AsDto(this Litter litter)
|
||||||
{
|
{
|
||||||
return new LitterDto{
|
return new LitterDto{
|
||||||
Id = litter.Id,
|
Id = litter.Id,
|
||||||
Date = litter.Date,
|
Date = litter.Date,
|
||||||
Father = litter.Father.AsDto(),
|
Father = litter.Father.AsDto(),
|
||||||
Mother = litter.Mother.AsDto(),
|
Mother = litter.Mother.AsDto(),
|
||||||
Name = litter.Name,
|
Name = litter.Name,
|
||||||
Strength = litter.Strength
|
Strength = litter.Strength
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
namespace GerbilManager.Dtos
|
namespace GerbilManager.Dtos
|
||||||
{
|
{
|
||||||
public record BreederDto
|
public record BreederDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; init; }
|
public Guid Id { get; init; }
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
namespace GerbilManager.Dtos
|
namespace GerbilManager.Dtos
|
||||||
{
|
{
|
||||||
public record CreateBreederDto
|
public record CreateBreederDto
|
||||||
{
|
{
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
namespace GerbilManager.Dtos
|
namespace GerbilManager.Dtos
|
||||||
{
|
{
|
||||||
public record CreateGerbilDto
|
public record CreateGerbilDto
|
||||||
{
|
{
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
public GenderDto Gender { get; init; }
|
public GenderDto Gender { get; init; }
|
||||||
public Guid Litter { get; init; }
|
public Guid Litter { get; init; }
|
||||||
public Guid Breeder { get; init; }
|
public Guid Breeder { get; init; }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
namespace GerbilManager.Dtos
|
namespace GerbilManager.Dtos
|
||||||
{
|
{
|
||||||
public record CreateLitterDto
|
public record CreateLitterDto
|
||||||
{
|
{
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
public DateTime Date { get; init; }
|
public DateTime Date { get; init; }
|
||||||
public int Strength { get; init; }
|
public int Strength { get; init; }
|
||||||
public Guid Father { get; init; }
|
public Guid Father { get; init; }
|
||||||
public Guid Mother { get; init; }
|
public Guid Mother { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
namespace GerbilManager.Dtos
|
namespace GerbilManager.Dtos
|
||||||
{
|
{
|
||||||
public enum GenderDto
|
public enum GenderDto
|
||||||
{
|
{
|
||||||
unknown = 0,
|
unknown = 0,
|
||||||
male = 1,
|
male = 1,
|
||||||
female = 2
|
female = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
namespace GerbilManager.Dtos
|
namespace GerbilManager.Dtos
|
||||||
{
|
{
|
||||||
public record GerbilDto
|
public record GerbilDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; init; }
|
public Guid Id { get; init; }
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
public GenderDto Gender { get; init; }
|
public GenderDto Gender { get; init; }
|
||||||
public LitterDto Litter { get; init; }
|
public LitterDto Litter { get; init; }
|
||||||
public BreederDto Breeder { get; init; }
|
public BreederDto Breeder { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
namespace GerbilManager.Dtos
|
namespace GerbilManager.Dtos
|
||||||
{
|
{
|
||||||
public record LitterDto
|
public record LitterDto
|
||||||
{
|
{
|
||||||
public Guid Id { get; init; }
|
public Guid Id { get; init; }
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
public DateTime Date { get; init; }
|
public DateTime Date { get; init; }
|
||||||
public int Strength { get; init; }
|
public int Strength { get; init; }
|
||||||
public GerbilDto Father { get; init; }
|
public GerbilDto Father { get; init; }
|
||||||
public GerbilDto Mother { get; init; }
|
public GerbilDto Mother { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
namespace GerbilManager.Dtos
|
namespace GerbilManager.Dtos
|
||||||
{
|
{
|
||||||
public record UpdateBreederDto
|
public record UpdateBreederDto
|
||||||
{
|
{
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
namespace GerbilManager.Dtos
|
namespace GerbilManager.Dtos
|
||||||
{
|
{
|
||||||
public record UpdateGerbilDto
|
public record UpdateGerbilDto
|
||||||
{
|
{
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
public GenderDto Gender { get; init; }
|
public GenderDto Gender { get; init; }
|
||||||
public LitterDto Litter { get; init; }
|
public LitterDto Litter { get; init; }
|
||||||
public BreederDto Breeder { get; init; }
|
public BreederDto Breeder { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
namespace GerbilManager.Dtos
|
namespace GerbilManager.Dtos
|
||||||
{
|
{
|
||||||
public record UpdateLitterDto
|
public record UpdateLitterDto
|
||||||
{
|
{
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
public DateTime Date { get; init; }
|
public DateTime Date { get; init; }
|
||||||
public int Strength { get; init; }
|
public int Strength { get; init; }
|
||||||
public Guid Father { get; init; }
|
public Guid Father { get; init; }
|
||||||
public Guid Mother { get; init; }
|
public Guid Mother { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.9" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.12" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.12" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.12" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
namespace GerbilManager.Models
|
namespace GerbilManager.Models
|
||||||
{
|
{
|
||||||
public record Breeder
|
public record Breeder
|
||||||
{
|
{
|
||||||
public Guid Id { get; init; }
|
public Guid Id { get; init; }
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
namespace GerbilManager.Models
|
namespace GerbilManager.Models
|
||||||
{
|
{
|
||||||
public enum Gender
|
public enum Gender
|
||||||
{
|
{
|
||||||
unknown = 0,
|
unknown = 0,
|
||||||
male = 1,
|
male = 1,
|
||||||
female = 2
|
female = 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
namespace GerbilManager.Models
|
namespace GerbilManager.Models
|
||||||
{
|
{
|
||||||
public record Gerbil
|
public record Gerbil
|
||||||
{
|
{
|
||||||
public Guid Id { get; init; }
|
public Guid Id { get; init; }
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
public Gender Gender { get; init; }
|
public Gender Gender { get; init; }
|
||||||
public Litter Litter { get; init; }
|
public Litter Litter { get; init; }
|
||||||
public Breeder Breeder { get; init; }
|
public Breeder Breeder { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
namespace GerbilManager.Models
|
namespace GerbilManager.Models
|
||||||
{
|
{
|
||||||
public record Litter
|
public record Litter
|
||||||
{
|
{
|
||||||
public Guid Id { get; init; }
|
public Guid Id { get; init; }
|
||||||
public string Name { get; init; }
|
public string Name { get; init; }
|
||||||
public DateTime Date { get; init; }
|
public DateTime Date { get; init; }
|
||||||
public int Strength { get; init; }
|
public int Strength { get; init; }
|
||||||
public Gerbil Father { get; init; }
|
public Gerbil Father { get; init; }
|
||||||
public Gerbil Mother { get; init; }
|
public Gerbil Mother { get; init; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,33 +1,33 @@
|
|||||||
using GerbilManager.Repositories;
|
using GerbilManager.Repositories;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
|
|
||||||
builder.Services.AddControllers();
|
builder.Services.AddControllers();
|
||||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||||
builder.Services.AddEndpointsApiExplorer();
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
builder.Services.AddSwaggerGen();
|
builder.Services.AddSwaggerGen();
|
||||||
|
|
||||||
builder.Services.AddSingleton<IGerbilRepository, InMemGerbilRepository>();
|
builder.Services.AddSingleton<IGerbilRepository, InMemGerbilRepository>();
|
||||||
|
|
||||||
builder.Services.AddDbContext<ApplicationContext>(opts => opts.UseSqlServer(Configuration.GetConnectionString("sqlConnection")));
|
builder.Services.AddDbContext<ApplicationContext>(opts => opts.UseSqlServer(Configuration.GetConnectionString("sqlConnection")));
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
app.UseSwaggerUI();
|
app.UseSwaggerUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
|
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
@@ -1,41 +1,41 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
"iisSettings": {
|
"iisSettings": {
|
||||||
"windowsAuthentication": false,
|
"windowsAuthentication": false,
|
||||||
"anonymousAuthentication": true,
|
"anonymousAuthentication": true,
|
||||||
"iisExpress": {
|
"iisExpress": {
|
||||||
"applicationUrl": "http://localhost:23762",
|
"applicationUrl": "http://localhost:23762",
|
||||||
"sslPort": 44327
|
"sslPort": 44327
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"http": {
|
"http": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"launchUrl": "swagger",
|
"launchUrl": "swagger",
|
||||||
"applicationUrl": "http://localhost:5179",
|
"applicationUrl": "http://localhost:5179",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"https": {
|
"https": {
|
||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"dotnetRunMessages": true,
|
"dotnetRunMessages": true,
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"launchUrl": "swagger",
|
"launchUrl": "swagger",
|
||||||
"applicationUrl": "https://localhost:7191;http://localhost:5179",
|
"applicationUrl": "https://localhost:7191;http://localhost:5179",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"IIS Express": {
|
"IIS Express": {
|
||||||
"commandName": "IISExpress",
|
"commandName": "IISExpress",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"launchUrl": "swagger",
|
"launchUrl": "swagger",
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
|
|
||||||
namespace GerbilManager.Repositories
|
namespace GerbilManager.Repositories
|
||||||
{
|
{
|
||||||
public interface IBreederRepository
|
public interface IBreederRepository
|
||||||
{
|
{
|
||||||
IEnumerable<Breeder> GetBreeders();
|
IEnumerable<Breeder> GetBreeders();
|
||||||
|
|
||||||
Breeder GetBreeder(Guid id);
|
Breeder GetBreeder(Guid id);
|
||||||
|
|
||||||
void CreateBreeder(Breeder breeder);
|
void CreateBreeder(Breeder breeder);
|
||||||
|
|
||||||
void UpdateBreeder(Breeder breeder);
|
void UpdateBreeder(Breeder breeder);
|
||||||
|
|
||||||
void DeleteBreeder(Breeder breeder);
|
void DeleteBreeder(Breeder breeder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
|
|
||||||
namespace GerbilManager.Repositories
|
namespace GerbilManager.Repositories
|
||||||
{
|
{
|
||||||
public interface IGerbilRepository
|
public interface IGerbilRepository
|
||||||
{
|
{
|
||||||
IEnumerable<Gerbil> GetGerbils();
|
IEnumerable<Gerbil> GetGerbils();
|
||||||
|
|
||||||
Gerbil GetGerbil(Guid id);
|
Gerbil GetGerbil(Guid id);
|
||||||
|
|
||||||
void CreateGerbil(Gerbil gerbil);
|
void CreateGerbil(Gerbil gerbil);
|
||||||
|
|
||||||
void UpdateGerbil(Gerbil gerbil);
|
void UpdateGerbil(Gerbil gerbil);
|
||||||
|
|
||||||
void DeleteGerbil(Gerbil gerilb);
|
void DeleteGerbil(Gerbil gerilb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
|
|
||||||
namespace GerbilManager.Repositories
|
namespace GerbilManager.Repositories
|
||||||
{
|
{
|
||||||
public interface ILitterRepository
|
public interface ILitterRepository
|
||||||
{
|
{
|
||||||
IEnumerable<Litter> GetLitters();
|
IEnumerable<Litter> GetLitters();
|
||||||
|
|
||||||
Litter GetLitter(Guid id);
|
Litter GetLitter(Guid id);
|
||||||
|
|
||||||
void CreateLitter(Litter litter);
|
void CreateLitter(Litter litter);
|
||||||
void UpdateLitter(Litter litter);
|
void UpdateLitter(Litter litter);
|
||||||
void DeleteLitter(Litter litter);
|
void DeleteLitter(Litter litter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,39 +1,39 @@
|
|||||||
using GerbilManager.Models;
|
using GerbilManager.Models;
|
||||||
|
|
||||||
namespace GerbilManager.Repositories
|
namespace GerbilManager.Repositories
|
||||||
{
|
{
|
||||||
public class InMemGerbilRepository : IGerbilRepository
|
public class InMemGerbilRepository : IGerbilRepository
|
||||||
{
|
{
|
||||||
private readonly List<Gerbil> _gerbilList = new()
|
private readonly List<Gerbil> _gerbilList = new()
|
||||||
{
|
{
|
||||||
new Gerbil() {Id = Guid.NewGuid(), Name = "Blacky", Breeder = null, Litter = null, Gender = Gender.unknown},
|
new Gerbil() {Id = Guid.NewGuid(), Name = "Blacky", Breeder = null, Litter = null, Gender = Gender.unknown},
|
||||||
new Gerbil() {Id = Guid.NewGuid(), Name = "Coocky", Breeder = null, Litter = null, Gender = Gender.male},
|
new Gerbil() {Id = Guid.NewGuid(), Name = "Coocky", Breeder = null, Litter = null, Gender = Gender.male},
|
||||||
new Gerbil() {Id = Guid.NewGuid(), Name = "Lazy", Breeder = null, Litter = null, Gender = Gender.female}
|
new Gerbil() {Id = Guid.NewGuid(), Name = "Lazy", Breeder = null, Litter = null, Gender = Gender.female}
|
||||||
};
|
};
|
||||||
|
|
||||||
public IEnumerable<Gerbil> GetGerbils()
|
public IEnumerable<Gerbil> GetGerbils()
|
||||||
{
|
{
|
||||||
return _gerbilList;
|
return _gerbilList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Gerbil GetGerbil(Guid id) => _gerbilList.SingleOrDefault(x => x.Id == id);
|
public Gerbil GetGerbil(Guid id) => _gerbilList.SingleOrDefault(x => x.Id == id);
|
||||||
|
|
||||||
public void CreateGerbil(Gerbil gerbil)
|
public void CreateGerbil(Gerbil gerbil)
|
||||||
{
|
{
|
||||||
_gerbilList.Add(gerbil);
|
_gerbilList.Add(gerbil);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateGerbil(Gerbil gerbil)
|
public void UpdateGerbil(Gerbil gerbil)
|
||||||
{
|
{
|
||||||
var index = this._gerbilList.FindIndex(existingGerbil => existingGerbil.Id == gerbil.Id);
|
var index = this._gerbilList.FindIndex(existingGerbil => existingGerbil.Id == gerbil.Id);
|
||||||
_gerbilList[index] = gerbil;
|
_gerbilList[index] = gerbil;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteGerbil(Gerbil gerbil)
|
public void DeleteGerbil(Gerbil gerbil)
|
||||||
{
|
{
|
||||||
var index = this._gerbilList.FindIndex(existingGerbil => existingGerbil.Id == gerbil.Id);
|
var index = this._gerbilList.FindIndex(existingGerbil => existingGerbil.Id == gerbil.Id);
|
||||||
_gerbilList.RemoveAt(index);
|
_gerbilList.RemoveAt(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"sqlConnection": "server=.; database=GerbilManagerDebug; Integrated Security=true"
|
"sqlConnection": "server=.; database=GerbilManagerDebug; Integrated Security=true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"sqlConnection": "server=.; database=GerbilManager; Integrated Security=true"
|
"sqlConnection": "server=.; database=GerbilManager; Integrated Security=true"
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*"
|
"AllowedHosts": "*"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user