From d961f1db0211b37a0fca7a980903b695df477958 Mon Sep 17 00:00:00 2001 From: etudiant Date: Tue, 10 Jan 2023 09:06:33 +0100 Subject: [PATCH] :memo: repo & entity added --- cat_cafe/Entities/Bar.cs | 24 ++++++++++++++++++++++++ cat_cafe/Properties/launchSettings.json | 4 ++-- cat_cafe/Repositories/BarContext.cs | 11 +++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 cat_cafe/Entities/Bar.cs create mode 100644 cat_cafe/Repositories/BarContext.cs diff --git a/cat_cafe/Entities/Bar.cs b/cat_cafe/Entities/Bar.cs new file mode 100644 index 0000000..1345acd --- /dev/null +++ b/cat_cafe/Entities/Bar.cs @@ -0,0 +1,24 @@ +using System; +namespace cat_cafe.Entities +{ + public class Bar + { + + + public long Id { get; set; } + public string? Name { get; set; } + public List cats { get; set; } = new List(); + + + public void addCat(Cat c) + { + cats.Add(c); + } + public void removeCat(Cat c) + { + cats.Remove(c); + } + + } +} + diff --git a/cat_cafe/Properties/launchSettings.json b/cat_cafe/Properties/launchSettings.json index 4cda616..0e99e9a 100644 --- a/cat_cafe/Properties/launchSettings.json +++ b/cat_cafe/Properties/launchSettings.json @@ -1,4 +1,4 @@ -{ +{ "$schema": "https://json.schemastore.org/launchsettings.json", "iisSettings": { "windowsAuthentication": false, @@ -27,4 +27,4 @@ } } } -} +} \ No newline at end of file diff --git a/cat_cafe/Repositories/BarContext.cs b/cat_cafe/Repositories/BarContext.cs new file mode 100644 index 0000000..951737d --- /dev/null +++ b/cat_cafe/Repositories/BarContext.cs @@ -0,0 +1,11 @@ +using System; +namespace cat_cafe.Repositories +{ + public class BarContext + { + public BarContext() + { + } + } +} +