db working fine

customer_branche_TRO
Ismail TAHA JANAN 2 years ago
commit 3d7cb006af

2
.gitignore vendored

@ -1,6 +1,8 @@
# Created by https://www.toptal.com/developers/gitignore/api/dotnetcore,visualstudio,visualstudiocode # Created by https://www.toptal.com/developers/gitignore/api/dotnetcore,visualstudio,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=dotnetcore,visualstudio,visualstudiocode # Edit at https://www.toptal.com/developers/gitignore?templates=dotnetcore,visualstudio,visualstudiocode
log.txt
### DotnetCore ### ### DotnetCore ###
# .NET Core build folders # .NET Core build folders
bin/ bin/

@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "6.0.0",
"commands": [
"dotnet-ef"
]
}
}
}

@ -14,9 +14,9 @@ namespace cat_cafe.Controllers
[ApiController] [ApiController]
public class BarsController : ControllerBase public class BarsController : ControllerBase
{ {
private readonly BarContext _context; private readonly CatCafeDbContext _context;
public BarsController(BarContext context) public BarsController(CatCafeDbContext context)
{ {
_context = context; _context = context;
} }
@ -25,14 +25,14 @@ namespace cat_cafe.Controllers
[HttpGet] [HttpGet]
public async Task<ActionResult<IEnumerable<Bar>>> GetBars() public async Task<ActionResult<IEnumerable<Bar>>> GetBars()
{ {
return await _context.Bars.ToListAsync(); return await _context.bars.ToListAsync();
} }
// GET: api/Bars/5 // GET: api/Bars/5
[HttpGet("{id}")] [HttpGet("{id}")]
public async Task<ActionResult<Bar>> GetBar(long id) public async Task<ActionResult<Bar>> GetBar(long id)
{ {
var bar = await _context.Bars.FindAsync(id); var bar = await _context.bars.FindAsync(id);
if (bar == null) if (bar == null)
{ {
@ -78,7 +78,7 @@ namespace cat_cafe.Controllers
[HttpPost] [HttpPost]
public async Task<ActionResult<Bar>> PostBar(Bar bar) public async Task<ActionResult<Bar>> PostBar(Bar bar)
{ {
_context.Bars.Add(bar); _context.bars.Add(bar);
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return CreatedAtAction("GetBar", new { id = bar.Id }, bar); return CreatedAtAction("GetBar", new { id = bar.Id }, bar);
@ -88,13 +88,13 @@ namespace cat_cafe.Controllers
[HttpDelete("{id}")] [HttpDelete("{id}")]
public async Task<IActionResult> DeleteBar(long id) public async Task<IActionResult> DeleteBar(long id)
{ {
var bar = await _context.Bars.FindAsync(id); var bar = await _context.bars.FindAsync(id);
if (bar == null) if (bar == null)
{ {
return NotFound(); return NotFound();
} }
_context.Bars.Remove(bar); _context.bars.Remove(bar);
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return NoContent(); return NoContent();
@ -102,7 +102,7 @@ namespace cat_cafe.Controllers
private bool BarExists(long id) private bool BarExists(long id)
{ {
return _context.Bars.Any(e => e.Id == id); return _context.bars.Any(e => e.Id == id);
} }
} }
} }

@ -16,10 +16,10 @@ namespace cat_cafe.Controllers
[ApiController] [ApiController]
public class CatsController : ControllerBase public class CatsController : ControllerBase
{ {
private readonly CatContext _context; private readonly CatCafeDbContext _context;
private readonly IMapper _mapper; private readonly IMapper _mapper;
public CatsController(CatContext context, IMapper mapper) public CatsController(CatCafeDbContext context, IMapper mapper)
{ {
_mapper = mapper; _mapper = mapper;
_context = context; _context = context;
@ -29,7 +29,7 @@ namespace cat_cafe.Controllers
[HttpGet] [HttpGet]
public async Task<ActionResult<IEnumerable<CatDto>>> GetCats() public async Task<ActionResult<IEnumerable<CatDto>>> GetCats()
{ {
var cats = await _context.Cats.ToListAsync(); var cats = await _context.cats.ToListAsync();
return _mapper.Map<List<CatDto>>(cats); return _mapper.Map<List<CatDto>>(cats);
} }
@ -38,7 +38,7 @@ namespace cat_cafe.Controllers
[HttpGet("{id}")] [HttpGet("{id}")]
public async Task<ActionResult<CatDto>> GetCat(long id) public async Task<ActionResult<CatDto>> GetCat(long id)
{ {
var cat = await _context.Cats.FindAsync(id); var cat = await _context.cats.FindAsync(id);
if (cat == null) if (cat == null)
{ {
@ -86,7 +86,7 @@ namespace cat_cafe.Controllers
public async Task<ActionResult<CatDto>> PostCat(CatDto catDto) public async Task<ActionResult<CatDto>> PostCat(CatDto catDto)
{ {
Cat cat = _mapper.Map<Cat>(catDto); Cat cat = _mapper.Map<Cat>(catDto);
_context.Cats.Add(cat); _context.cats.Add(cat);
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return CreatedAtAction("GetCat", new { id = catDto.Id }, _mapper.Map<CatDto>(cat)); return CreatedAtAction("GetCat", new { id = catDto.Id }, _mapper.Map<CatDto>(cat));
@ -96,13 +96,13 @@ namespace cat_cafe.Controllers
[HttpDelete("{id}")] [HttpDelete("{id}")]
public async Task<IActionResult> DeleteCat(long id) public async Task<IActionResult> DeleteCat(long id)
{ {
var cat = await _context.Cats.FindAsync(id); var cat = await _context.cats.FindAsync(id);
if (cat == null) if (cat == null)
{ {
return NotFound(); return NotFound();
} }
_context.Cats.Remove(cat); _context.cats.Remove(cat);
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return NoContent(); return NoContent();
@ -110,7 +110,7 @@ namespace cat_cafe.Controllers
private bool CatExists(long id) private bool CatExists(long id)
{ {
return _context.Cats.Any(e => e.Id == id); return _context.cats.Any(e => e.Id == id);
} }
} }
} }

@ -18,11 +18,11 @@ namespace cat_cafe.Controllers
[ApiController] [ApiController]
public class CustomersController : ControllerBase public class CustomersController : ControllerBase
{ {
private readonly CustomerContext _context; private readonly CatCafeDbContext _context;
private readonly IMapper _mapper; private readonly IMapper _mapper;
private readonly ILogger<CustomersController> _logger; private readonly ILogger<CustomersController> _logger;
public CustomersController(CustomerContext context,IMapper mapper,ILogger<CustomersController> logger) public CustomersController(CatCafeDbContext context,IMapper mapper,ILogger<CustomersController> logger)
{ {
_context = context; _context = context;
_mapper = mapper; _mapper = mapper;
@ -34,8 +34,9 @@ namespace cat_cafe.Controllers
public async Task<ActionResult<IEnumerable<CustomerDto>>> GetCustomers() public async Task<ActionResult<IEnumerable<CustomerDto>>> GetCustomers()
{ {
Log.Information(this.Request.Method + " => get All customers"); Log.Information(this.Request.Method + " => get All customers");
_logger.LogInformation("hello");
var customers = await _context.Customers.ToListAsync(); var customers = await _context.customers.ToListAsync();
Log.Information(this.Request.Method + " => " Log.Information(this.Request.Method + " => "
+ this.Response.StatusCode.ToString() + " " + this.Response.StatusCode.ToString() + " "
@ -49,7 +50,7 @@ namespace cat_cafe.Controllers
public async Task<ActionResult<CustomerDto>> GetCustomer(long id) public async Task<ActionResult<CustomerDto>> GetCustomer(long id)
{ {
Log.Information(this.Request.Method + " => get by ID {@id}",id); Log.Information(this.Request.Method + " => get by ID {@id}",id);
var customer = await _context.Customers.FindAsync(id); var customer = await _context.customers.FindAsync(id);
if (customer == null) if (customer == null)
{ {
@ -112,7 +113,7 @@ namespace cat_cafe.Controllers
Log.Information(this.Request.Method + " => post customer"); Log.Information(this.Request.Method + " => post customer");
Customer customer = _mapper.Map<Customer>(customerDto); Customer customer = _mapper.Map<Customer>(customerDto);
_context.Customers.Add(customer); _context.customers.Add(customer);
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
Log.Information(this.Request.Method + " => " Log.Information(this.Request.Method + " => "
@ -129,14 +130,14 @@ namespace cat_cafe.Controllers
{ {
Log.Information(this.Request.Method + " => delete by ID {@id}", id); Log.Information(this.Request.Method + " => delete by ID {@id}", id);
var customer = await _context.Customers.FindAsync(id); var customer = await _context.customers.FindAsync(id);
if (customer == null) if (customer == null)
{ {
Log.Information(this.Request.Method + " => " + NotFound().StatusCode.ToString()); Log.Information(this.Request.Method + " => " + NotFound().StatusCode.ToString());
return NotFound(); return NotFound();
} }
_context.Customers.Remove(customer); _context.customers.Remove(customer);
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
Log.Information(this.Request.Method + " => " Log.Information(this.Request.Method + " => "
@ -149,7 +150,7 @@ namespace cat_cafe.Controllers
private bool CustomerExists(long id) private bool CustomerExists(long id)
{ {
return _context.Customers.Any(e => e.Id == id); return _context.customers.Any(e => e.Id == id);
} }
} }
} }

Binary file not shown.

@ -0,0 +1,90 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using cat_cafe.Repositories;
#nullable disable
namespace cat_cafe.Migrations
{
[DbContext(typeof(CatCafeDbContext))]
[Migration("20230204085149_myMigrationNa")]
partial class myMigrationNa
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.12");
modelBuilder.Entity("cat_cafe.Entities.Bar", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("bars");
});
modelBuilder.Entity("cat_cafe.Entities.Cat", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("Age")
.HasColumnType("INTEGER");
b.Property<long?>("BarId")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("BarId");
b.ToTable("cats");
});
modelBuilder.Entity("cat_cafe.Entities.Customer", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("Age")
.HasColumnType("INTEGER");
b.Property<string>("FullName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("customers");
});
modelBuilder.Entity("cat_cafe.Entities.Cat", b =>
{
b.HasOne("cat_cafe.Entities.Bar", null)
.WithMany("cats")
.HasForeignKey("BarId");
});
modelBuilder.Entity("cat_cafe.Entities.Bar", b =>
{
b.Navigation("cats");
});
#pragma warning restore 612, 618
}
}
}

@ -0,0 +1,76 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace cat_cafe.Migrations
{
public partial class myMigrationNa : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "bars",
columns: table => new
{
Id = table.Column<long>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_bars", x => x.Id);
});
migrationBuilder.CreateTable(
name: "customers",
columns: table => new
{
Id = table.Column<long>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
FullName = table.Column<string>(type: "TEXT", nullable: false),
Age = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_customers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "cats",
columns: table => new
{
Id = table.Column<long>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(type: "TEXT", nullable: true),
Age = table.Column<int>(type: "INTEGER", nullable: false),
BarId = table.Column<long>(type: "INTEGER", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_cats", x => x.Id);
table.ForeignKey(
name: "FK_cats_bars_BarId",
column: x => x.BarId,
principalTable: "bars",
principalColumn: "Id");
});
migrationBuilder.CreateIndex(
name: "IX_cats_BarId",
table: "cats",
column: "BarId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "cats");
migrationBuilder.DropTable(
name: "customers");
migrationBuilder.DropTable(
name: "bars");
}
}
}

@ -0,0 +1,88 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using cat_cafe.Repositories;
#nullable disable
namespace cat_cafe.Migrations
{
[DbContext(typeof(CatCafeDbContext))]
partial class CatCafeDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.12");
modelBuilder.Entity("cat_cafe.Entities.Bar", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("bars");
});
modelBuilder.Entity("cat_cafe.Entities.Cat", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("Age")
.HasColumnType("INTEGER");
b.Property<long?>("BarId")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("BarId");
b.ToTable("cats");
});
modelBuilder.Entity("cat_cafe.Entities.Customer", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("Age")
.HasColumnType("INTEGER");
b.Property<string>("FullName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("customers");
});
modelBuilder.Entity("cat_cafe.Entities.Cat", b =>
{
b.HasOne("cat_cafe.Entities.Bar", null)
.WithMany("cats")
.HasForeignKey("BarId");
});
modelBuilder.Entity("cat_cafe.Entities.Bar", b =>
{
b.Navigation("cats");
});
#pragma warning restore 612, 618
}
}
}

@ -2,6 +2,9 @@ using Microsoft.EntityFrameworkCore;
using cat_cafe.Repositories; using cat_cafe.Repositories;
using Serilog; using Serilog;
using Serilog.Sinks.File; using Serilog.Sinks.File;
using System.Diagnostics;
using cat_cafe.Entities;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
@ -15,12 +18,26 @@ Log.Logger = new LoggerConfiguration().MinimumLevel.Information().WriteTo.File("
// Add services to the container. // Add services to the container.
builder.Services.AddControllers(); builder.Services.AddControllers();
builder.Services.AddDbContext<CatContext>(opt => builder.Services.AddDbContext<CatCafeDbContext>();
opt.UseInMemoryDatabase("CatCafe")); //builder.Services.AddDbContext<CatContext>(opt =>
builder.Services.AddDbContext<BarContext>(opt => //opt.UseInMemoryDatabase("CatCafe"));
opt.UseSqlite("CatCafe")); //builder.Services.AddDbContext<BarContext>(opt =>
builder.Services.AddDbContext<CustomerContext>(opt => //opt.UseSqlite("CatCafe"));
opt.UseInMemoryDatabase("CatCafe")); //builder.Services.AddDbContext<CatCafeDbContext>(opt =>
//opt.UseSqlite("$Data Source ={CatCafe}"));
try
{
// DB stuff when the app opens
using (CatCafeDbContext db = new())
{
}
}
catch (Exception ex) { Console.WriteLine($"{ex.Message}\n... Couldn't use the database"); }
// 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();

@ -1,17 +1,17 @@
using cat_cafe.Entities; //using cat_cafe.Entities;
using Microsoft.EntityFrameworkCore; //using Microsoft.EntityFrameworkCore;
using System; //using System;
namespace cat_cafe.Repositories //namespace cat_cafe.Repositories
{ //{
public class BarContext : DbContext // public class BarContext : DbContext
{ // {
public BarContext(DbContextOptions<BarContext> options) // public BarContext(DbContextOptions<BarContext> options)
: base(options) // : base(options)
{ // {
} // }
public DbSet<Bar> Bars { get; set; } = null!; // public DbSet<Bar> Bars { get; set; } = null!;
} // }
} //}

@ -0,0 +1,33 @@
using System;
using Microsoft.EntityFrameworkCore;
using cat_cafe.Entities;
namespace cat_cafe.Repositories
{
public class CatCafeDbContext:DbContext
{
public DbSet<Customer> customers { get; set; }
public DbSet<Bar> bars { get; set; }
public DbSet<Cat> cats { get; set; }
public CatCafeDbContext(DbContextOptions<CatCafeDbContext> opts)
:base(opts)
{
Database.EnsureCreated();
}
public CatCafeDbContext()
{
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured) optionsBuilder.UseSqlite("Data Source=EFCatCafe.db").EnableSensitiveDataLogging();
}
}
}

@ -1,16 +1,16 @@
using cat_cafe.Entities; //using cat_cafe.Entities;
using Microsoft.EntityFrameworkCore; //using Microsoft.EntityFrameworkCore;
namespace cat_cafe.Repositories //namespace cat_cafe.Repositories
{ //{
public class CatContext : DbContext // public class CatContext : DbContext
{ // {
public CatContext(DbContextOptions<CatContext> options) // public CatContext(DbContextOptions<CatContext> options)
: base(options) // : base(options)
{ // {
} // }
public DbSet<Cat> Cats { get; set; } = null!; // public DbSet<Cat> Cats { get; set; } = null!;
} // }
} //}

@ -1,28 +1,33 @@
using System; //using System;
using cat_cafe.Entities; //using cat_cafe.Entities;
using Microsoft.EntityFrameworkCore; //using Microsoft.EntityFrameworkCore;
namespace cat_cafe.Repositories //namespace cat_cafe.Repositories
{ //{
public class CustomerContext:DbContext // public class CustomerContext:DbContext
{ // {
public readonly IConfiguration configuration; // public readonly IConfiguration configuration;
public CustomerContext(IConfiguration _configuration) // public string DbPath { get; }
{
configuration = _configuration;
}
protected override void OnConfiguring(DbContextOptionsBuilder opts) // public CustomerContext(IConfiguration _configuration)
{ // {
opts.UseSqlite(configuration.GetConnectionString(@"Data Source=CatCafe.db")); // configuration = _configuration;
} // var folder = Environment.SpecialFolder.LocalApplicationData;
// var path = Environment.GetFolderPath(folder);
// DbPath = System.IO.Path.Join(path, "CatCafe.db");
// }
// protected override void OnConfiguring(DbContextOptionsBuilder opts)
// {
// opts.UseSqlite($"Data Source=DbPath.db");
// }
/*public CustomerContext(DbContextOptions<CustomerContext> options)
: base(options) // /*public CustomerContext(DbContextOptions<CustomerContext> options)
{ }*/ // : base(options)
public DbSet<Customer> Customers { get; set; } = null!; // { }*/
} // public DbSet<Customer> Customers { get; set; } = null!;
} // }
//}

@ -4,10 +4,10 @@
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<StartWorkingDirectory>$(MSBuildProjectDirectory)</StartWorkingDirectory>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.12" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.12" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.12" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.12"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.12">
@ -27,5 +27,6 @@
<None Remove="Serilog.Extensions.Logging.File" /> <None Remove="Serilog.Extensions.Logging.File" />
<None Remove="Serilog" /> <None Remove="Serilog" />
<None Remove="Serilog.Sinks.File" /> <None Remove="Serilog.Sinks.File" />
<None Remove="Microsoft.EntityFrameworkCore" />
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -105,3 +105,35 @@
2023-01-21 08:51:20.382 +01:00 [INF] program start 2023-01-21 08:51:20.382 +01:00 [INF] program start
2023-01-21 09:52:51.283 +01:00 [INF] program start 2023-01-21 09:52:51.283 +01:00 [INF] program start
2023-01-21 09:53:00.966 +01:00 [INF] POST => post customer 2023-01-21 09:53:00.966 +01:00 [INF] POST => post customer
2023-01-28 10:43:30.841 +01:00 [INF] program start
2023-01-28 10:43:40.549 +01:00 [INF] GET => get All customers
2023-01-28 10:44:16.773 +01:00 [INF] program start
2023-01-28 10:44:22.429 +01:00 [INF] GET => get All customers
2023-01-28 10:54:58.453 +01:00 [INF] program start
2023-01-28 10:55:31.556 +01:00 [INF] program start
2023-02-04 08:16:09.059 +01:00 [INF] program start
2023-02-04 08:17:13.242 +01:00 [INF] program start
2023-02-04 08:33:04.111 +01:00 [INF] program start
2023-02-04 08:33:11.901 +01:00 [INF] GET => get All customers
2023-02-04 09:34:41.222 +01:00 [INF] program start
2023-02-04 09:38:43.323 +01:00 [INF] program start
2023-02-04 09:44:32.881 +01:00 [INF] program start
2023-02-04 09:44:44.716 +01:00 [INF] GET => get All customers
2023-02-04 09:45:51.387 +01:00 [INF] program start
2023-02-04 09:45:58.688 +01:00 [INF] GET => get All customers
2023-02-04 09:51:59.042 +01:00 [INF] program start
2023-02-04 09:52:06.882 +01:00 [INF] GET => get All customers
2023-02-04 09:52:58.838 +01:00 [INF] program start
2023-02-04 09:53:07.179 +01:00 [INF] GET => get All customers
2023-02-04 09:53:07.239 +01:00 [INF] GET => 200 System.Collections.Generic.List`1[cat_cafe.Entities.Customer] length[0]
2023-02-04 09:53:21.763 +01:00 [INF] POST => post customer
2023-02-04 09:53:21.869 +01:00 [INF] POST => 201 cat_cafe.Entities.Customer {"Id":1,"FullName":"string","Age":0}
2023-02-04 09:53:25.604 +01:00 [INF] POST => post customer
2023-02-04 09:53:25.608 +01:00 [INF] POST => 201 cat_cafe.Entities.Customer {"Id":2,"FullName":"string","Age":0}
2023-02-04 09:53:28.472 +01:00 [INF] POST => post customer
2023-02-04 09:53:28.478 +01:00 [INF] POST => 201 cat_cafe.Entities.Customer {"Id":3,"FullName":"string","Age":0}
2023-02-04 09:53:32.476 +01:00 [INF] GET => get All customers
2023-02-04 09:53:32.486 +01:00 [INF] GET => 200 System.Collections.Generic.List`1[cat_cafe.Entities.Customer] length[3]
2023-02-04 09:53:40.756 +01:00 [INF] program start
2023-02-04 09:53:50.214 +01:00 [INF] GET => get All customers
2023-02-04 09:53:50.290 +01:00 [INF] GET => 200 System.Collections.Generic.List`1[cat_cafe.Entities.Customer] length[3]

Loading…
Cancel
Save