diff --git a/src/WebApi/Controllers/AllergienController.cs b/src/WebApi/Controllers/AllergienController.cs new file mode 100644 index 0000000..40df2bf --- /dev/null +++ b/src/WebApi/Controllers/AllergienController.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using WebApi.Models; +using WebApi.Data; + +namespace WebApi.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class AllergienController : ControllerBase + { + private readonly WebApiContext _context; + + public AllergienController(WebApiContext context) + { + _context = context; + } + + // GET: api/Allergien + [HttpGet] + public async Task>> GetAllergies() + { + if (_context.Allergies == null) + { + return NotFound(); + } + return await _context.Allergies.ToListAsync(); + } + + // GET: api/Allergien/5 + [HttpGet("{id}")] + public async Task> GetAllergie(int id) + { + if (_context.Allergies == null) + { + return NotFound(); + } + var allergie = await _context.Allergies.FindAsync(id); + + if (allergie == null) + { + return NotFound(); + } + + return allergie; + } + + // PUT: api/Allergien/5 + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPut("{id}")] + public async Task PutAllergie(int id, Allergie allergie) + { + if (id != allergie.Idallergie) + { + return BadRequest(); + } + + _context.Entry(allergie).State = EntityState.Modified; + + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateConcurrencyException) + { + if (!AllergieExists(id)) + { + return NotFound(); + } + else + { + throw; + } + } + + return NoContent(); + } + + // POST: api/Allergien + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPost] + public async Task> PostAllergie(Allergie allergie) + { + if (_context.Allergies == null) + { + return Problem("Entity set 'WebApiContext.Allergies' is null."); + } + _context.Allergies.Add(allergie); + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateException) + { + if (AllergieExists(allergie.Idallergie)) + { + return Conflict(); + } + else + { + throw; + } + } + + return CreatedAtAction("GetAllergie", new { id = allergie.Idallergie }, allergie); + } + + // DELETE: api/Allergien/5 + [HttpDelete("{id}")] + public async Task DeleteAllergie(int id) + { + if (_context.Allergies == null) + { + return NotFound(); + } + var allergie = await _context.Allergies.FindAsync(id); + if (allergie == null) + { + return NotFound(); + } + + _context.Allergies.Remove(allergie); + await _context.SaveChangesAsync(); + + return NoContent(); + } + + private bool AllergieExists(int id) + { + return (_context.Allergies?.Any(e => e.Idallergie == id)).GetValueOrDefault(); + } + + + } +} diff --git a/src/WebApi/Controllers/BestellungspositionenController.cs b/src/WebApi/Controllers/BestellungspositionenController.cs new file mode 100644 index 0000000..7cc8da0 --- /dev/null +++ b/src/WebApi/Controllers/BestellungspositionenController.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using WebApi.Data; +using WebApi.Models; + +namespace WebApi.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class BestellungspositionenController : ControllerBase + { + private readonly WebApiContext _context; + + public BestellungspositionenController(WebApiContext context) + { + _context = context; + } + + // GET: api/Bestellungspositionen + [HttpGet] + public async Task>> GetBestellungspositions() + { + if (_context.Bestellungspositions == null) + { + return NotFound(); + } + return await _context.Bestellungspositions.ToListAsync(); + } + + // GET: api/Bestellungspositionen/5 + [HttpGet("{id}")] + public async Task> GetBestellungsposition(int id) + { + if (_context.Bestellungspositions == null) + { + return NotFound(); + } + var bestellungsposition = await _context.Bestellungspositions.FindAsync(id); + + if (bestellungsposition == null) + { + return NotFound(); + } + + return bestellungsposition; + } + + // PUT: api/Bestellungspositionen/5 + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPut("{id}")] + public async Task PutBestellungsposition(int id, Bestellungsposition bestellungsposition) + { + if (id != bestellungsposition.Idbestellung) + { + return BadRequest(); + } + + _context.Entry(bestellungsposition).State = EntityState.Modified; + + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateConcurrencyException) + { + if (!BestellungspositionExists(id)) + { + return NotFound(); + } + else + { + throw; + } + } + + return NoContent(); + } + + // POST: api/Bestellungspositionen + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPost] + public async Task> PostBestellungsposition(Bestellungsposition bestellungsposition) + { + if (_context.Bestellungspositions == null) + { + return Problem("Entity set 'WebApiContext.Bestellungspositions' is null."); + } + _context.Bestellungspositions.Add(bestellungsposition); + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateException) + { + if (BestellungspositionExists(bestellungsposition.Idbestellung)) + { + return Conflict(); + } + else + { + throw; + } + } + + return CreatedAtAction("GetBestellungsposition", new { id = bestellungsposition.Idbestellung }, bestellungsposition); + } + + // DELETE: api/Bestellungspositionen/5 + [HttpDelete("{id}")] + public async Task DeleteBestellungsposition(int id) + { + if (_context.Bestellungspositions == null) + { + return NotFound(); + } + var bestellungsposition = await _context.Bestellungspositions.FindAsync(id); + if (bestellungsposition == null) + { + return NotFound(); + } + + _context.Bestellungspositions.Remove(bestellungsposition); + await _context.SaveChangesAsync(); + + return NoContent(); + } + + private bool BestellungspositionExists(int id) + { + return (_context.Bestellungspositions?.Any(e => e.Idbestellung == id)).GetValueOrDefault(); + } + } +} diff --git a/src/WebApi/Controllers/KundenController.cs b/src/WebApi/Controllers/KundenController.cs new file mode 100644 index 0000000..cb67510 --- /dev/null +++ b/src/WebApi/Controllers/KundenController.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using WebApi.Data; +using WebApi.Models; + +namespace WebApi.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class KundenController : ControllerBase + { + private readonly WebApiContext _context; + + public KundenController(WebApiContext context) + { + _context = context; + } + + // GET: api/Kunden + [HttpGet] + public async Task>> GetKundes() + { + if (_context.Kundes == null) + { + return NotFound(); + } + return await _context.Kundes.ToListAsync(); + } + + // GET: api/Kunden/5 + [HttpGet("{id}")] + public async Task> GetKunde(int id) + { + if (_context.Kundes == null) + { + return NotFound(); + } + var kunde = await _context.Kundes.FindAsync(id); + + if (kunde == null) + { + return NotFound(); + } + + return kunde; + } + + // PUT: api/Kunden/5 + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPut("{id}")] + public async Task PutKunde(int id, Kunde kunde) + { + if (id != kunde.Idkunde) + { + return BadRequest(); + } + + _context.Entry(kunde).State = EntityState.Modified; + + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateConcurrencyException) + { + if (!KundeExists(id)) + { + return NotFound(); + } + else + { + throw; + } + } + + return NoContent(); + } + + // POST: api/Kunden + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPost] + public async Task> PostKunde(Kunde kunde) + { + if (_context.Kundes == null) + { + return Problem("Entity set 'WebApiContext.Kundes' is null."); + } + _context.Kundes.Add(kunde); + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateException) + { + if (KundeExists(kunde.Idkunde)) + { + return Conflict(); + } + else + { + throw; + } + } + + return CreatedAtAction("GetKunde", new { id = kunde.Idkunde }, kunde); + } + + // DELETE: api/Kunden/5 + [HttpDelete("{id}")] + public async Task DeleteKunde(int id) + { + if (_context.Kundes == null) + { + return NotFound(); + } + var kunde = await _context.Kundes.FindAsync(id); + if (kunde == null) + { + return NotFound(); + } + + _context.Kundes.Remove(kunde); + await _context.SaveChangesAsync(); + + return NoContent(); + } + + private bool KundeExists(int id) + { + return (_context.Kundes?.Any(e => e.Idkunde == id)).GetValueOrDefault(); + } + } +} diff --git a/src/WebApi/Controllers/MenuitemkategoriesController.cs b/src/WebApi/Controllers/MenuitemkategoriesController.cs new file mode 100644 index 0000000..81e1dec --- /dev/null +++ b/src/WebApi/Controllers/MenuitemkategoriesController.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using WebApi.Data; +using WebApi.Models; + +namespace WebApi.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class MenuitemkategoriesController : ControllerBase + { + private readonly WebApiContext _context; + + public MenuitemkategoriesController(WebApiContext context) + { + _context = context; + } + + // GET: api/Menuitemkategories + [HttpGet] + public async Task>> GetMenuitemkategories() + { + if (_context.Menuitemkategories == null) + { + return NotFound(); + } + return await _context.Menuitemkategories.ToListAsync(); + } + + // GET: api/Menuitemkategories/5 + [HttpGet("{id}")] + public async Task> GetMenuitemkategorie(int id) + { + if (_context.Menuitemkategories == null) + { + return NotFound(); + } + var menuitemkategorie = await _context.Menuitemkategories.FindAsync(id); + + if (menuitemkategorie == null) + { + return NotFound(); + } + + return menuitemkategorie; + } + + // PUT: api/Menuitemkategories/5 + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPut("{id}")] + public async Task PutMenuitemkategorie(int id, Menuitemkategorie menuitemkategorie) + { + if (id != menuitemkategorie.IdmenuItemKategorie) + { + return BadRequest(); + } + + _context.Entry(menuitemkategorie).State = EntityState.Modified; + + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateConcurrencyException) + { + if (!MenuitemkategorieExists(id)) + { + return NotFound(); + } + else + { + throw; + } + } + + return NoContent(); + } + + // POST: api/Menuitemkategories + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPost] + public async Task> PostMenuitemkategorie(Menuitemkategorie menuitemkategorie) + { + if (_context.Menuitemkategories == null) + { + return Problem("Entity set 'WebApiContext.Menuitemkategories' is null."); + } + _context.Menuitemkategories.Add(menuitemkategorie); + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateException) + { + if (MenuitemkategorieExists(menuitemkategorie.IdmenuItemKategorie)) + { + return Conflict(); + } + else + { + throw; + } + } + + return CreatedAtAction("GetMenuitemkategorie", new { id = menuitemkategorie.IdmenuItemKategorie }, menuitemkategorie); + } + + // DELETE: api/Menuitemkategories/5 + [HttpDelete("{id}")] + public async Task DeleteMenuitemkategorie(int id) + { + if (_context.Menuitemkategories == null) + { + return NotFound(); + } + var menuitemkategorie = await _context.Menuitemkategories.FindAsync(id); + if (menuitemkategorie == null) + { + return NotFound(); + } + + _context.Menuitemkategories.Remove(menuitemkategorie); + await _context.SaveChangesAsync(); + + return NoContent(); + } + + private bool MenuitemkategorieExists(int id) + { + return (_context.Menuitemkategories?.Any(e => e.IdmenuItemKategorie == id)).GetValueOrDefault(); + } + } +} diff --git a/src/WebApi/Controllers/MenuitemsController.cs b/src/WebApi/Controllers/MenuitemsController.cs new file mode 100644 index 0000000..87a205b --- /dev/null +++ b/src/WebApi/Controllers/MenuitemsController.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using WebApi.Data; +using WebApi.Models; + +namespace WebApi.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class MenuitemsController : ControllerBase + { + private readonly WebApiContext _context; + + public MenuitemsController(WebApiContext context) + { + _context = context; + } + + // GET: api/Menuitems + [HttpGet] + public async Task>> GetMenuitems() + { + if (_context.Menuitems == null) + { + return NotFound(); + } + return await _context.Menuitems.ToListAsync(); + } + + // GET: api/Menuitems/5 + [HttpGet("{id}")] + public async Task> GetMenuitem(int id) + { + if (_context.Menuitems == null) + { + return NotFound(); + } + var menuitem = await _context.Menuitems.FindAsync(id); + + if (menuitem == null) + { + return NotFound(); + } + + return menuitem; + } + + // PUT: api/Menuitems/5 + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPut("{id}")] + public async Task PutMenuitem(int id, Menuitem menuitem) + { + if (id != menuitem.IdmenuItem) + { + return BadRequest(); + } + + _context.Entry(menuitem).State = EntityState.Modified; + + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateConcurrencyException) + { + if (!MenuitemExists(id)) + { + return NotFound(); + } + else + { + throw; + } + } + + return NoContent(); + } + + // POST: api/Menuitems + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPost] + public async Task> PostMenuitem(Menuitem menuitem) + { + if (_context.Menuitems == null) + { + return Problem("Entity set 'WebApiContext.Menuitems' is null."); + } + _context.Menuitems.Add(menuitem); + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateException) + { + if (MenuitemExists(menuitem.IdmenuItem)) + { + return Conflict(); + } + else + { + throw; + } + } + + return CreatedAtAction("GetMenuitem", new { id = menuitem.IdmenuItem }, menuitem); + } + + // DELETE: api/Menuitems/5 + [HttpDelete("{id}")] + public async Task DeleteMenuitem(int id) + { + if (_context.Menuitems == null) + { + return NotFound(); + } + var menuitem = await _context.Menuitems.FindAsync(id); + if (menuitem == null) + { + return NotFound(); + } + + _context.Menuitems.Remove(menuitem); + await _context.SaveChangesAsync(); + + return NoContent(); + } + + private bool MenuitemExists(int id) + { + return (_context.Menuitems?.Any(e => e.IdmenuItem == id)).GetValueOrDefault(); + } + } +} diff --git a/src/WebApi/Controllers/MenuitemueberkategoriesController.cs b/src/WebApi/Controllers/MenuitemueberkategoriesController.cs new file mode 100644 index 0000000..1586361 --- /dev/null +++ b/src/WebApi/Controllers/MenuitemueberkategoriesController.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using WebApi.Data; +using WebApi.Models; + +namespace WebApi.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class MenuitemueberkategoriesController : ControllerBase + { + private readonly WebApiContext _context; + + public MenuitemueberkategoriesController(WebApiContext context) + { + _context = context; + } + + // GET: api/Menuitemueberkategories + [HttpGet] + public async Task>> GetMenuitemueberkategories() + { + if (_context.Menuitemueberkategories == null) + { + return NotFound(); + } + return await _context.Menuitemueberkategories.ToListAsync(); + } + + // GET: api/Menuitemueberkategories/5 + [HttpGet("{id}")] + public async Task> GetMenuitemueberkategorie(int id) + { + if (_context.Menuitemueberkategories == null) + { + return NotFound(); + } + var menuitemueberkategorie = await _context.Menuitemueberkategories.FindAsync(id); + + if (menuitemueberkategorie == null) + { + return NotFound(); + } + + return menuitemueberkategorie; + } + + // PUT: api/Menuitemueberkategories/5 + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPut("{id}")] + public async Task PutMenuitemueberkategorie(int id, Menuitemueberkategorie menuitemueberkategorie) + { + if (id != menuitemueberkategorie.IdmenuItemUeberkategorie) + { + return BadRequest(); + } + + _context.Entry(menuitemueberkategorie).State = EntityState.Modified; + + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateConcurrencyException) + { + if (!MenuitemueberkategorieExists(id)) + { + return NotFound(); + } + else + { + throw; + } + } + + return NoContent(); + } + + // POST: api/Menuitemueberkategories + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPost] + public async Task> PostMenuitemueberkategorie(Menuitemueberkategorie menuitemueberkategorie) + { + if (_context.Menuitemueberkategories == null) + { + return Problem("Entity set 'WebApiContext.Menuitemueberkategories' is null."); + } + _context.Menuitemueberkategories.Add(menuitemueberkategorie); + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateException) + { + if (MenuitemueberkategorieExists(menuitemueberkategorie.IdmenuItemUeberkategorie)) + { + return Conflict(); + } + else + { + throw; + } + } + + return CreatedAtAction("GetMenuitemueberkategorie", new { id = menuitemueberkategorie.IdmenuItemUeberkategorie }, menuitemueberkategorie); + } + + // DELETE: api/Menuitemueberkategories/5 + [HttpDelete("{id}")] + public async Task DeleteMenuitemueberkategorie(int id) + { + if (_context.Menuitemueberkategories == null) + { + return NotFound(); + } + var menuitemueberkategorie = await _context.Menuitemueberkategories.FindAsync(id); + if (menuitemueberkategorie == null) + { + return NotFound(); + } + + _context.Menuitemueberkategories.Remove(menuitemueberkategorie); + await _context.SaveChangesAsync(); + + return NoContent(); + } + + private bool MenuitemueberkategorieExists(int id) + { + return (_context.Menuitemueberkategories?.Any(e => e.IdmenuItemUeberkategorie == id)).GetValueOrDefault(); + } + } +} diff --git a/src/WebApi/Controllers/RabatteController.cs b/src/WebApi/Controllers/RabatteController.cs new file mode 100644 index 0000000..a01db6c --- /dev/null +++ b/src/WebApi/Controllers/RabatteController.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using WebApi.Data; +using WebApi.Models; + +namespace WebApi.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class RabatteController : ControllerBase + { + private readonly WebApiContext _context; + + public RabatteController(WebApiContext context) + { + _context = context; + } + + // GET: api/Rabatte + [HttpGet] + public async Task>> GetRabatts() + { + if (_context.Rabatts == null) + { + return NotFound(); + } + return await _context.Rabatts.ToListAsync(); + } + + // GET: api/Rabatte/5 + [HttpGet("{id}")] + public async Task> GetRabatt(int id) + { + if (_context.Rabatts == null) + { + return NotFound(); + } + var rabatt = await _context.Rabatts.FindAsync(id); + + if (rabatt == null) + { + return NotFound(); + } + + return rabatt; + } + + // PUT: api/Rabatte/5 + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPut("{id}")] + public async Task PutRabatt(int id, Rabatt rabatt) + { + if (id != rabatt.Idrabatt) + { + return BadRequest(); + } + + _context.Entry(rabatt).State = EntityState.Modified; + + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateConcurrencyException) + { + if (!RabattExists(id)) + { + return NotFound(); + } + else + { + throw; + } + } + + return NoContent(); + } + + // POST: api/Rabatte + // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 + [HttpPost] + public async Task> PostRabatt(Rabatt rabatt) + { + if (_context.Rabatts == null) + { + return Problem("Entity set 'WebApiContext.Rabatts' is null."); + } + _context.Rabatts.Add(rabatt); + try + { + await _context.SaveChangesAsync(); + } + catch (DbUpdateException) + { + if (RabattExists(rabatt.Idrabatt)) + { + return Conflict(); + } + else + { + throw; + } + } + + return CreatedAtAction("GetRabatt", new { id = rabatt.Idrabatt }, rabatt); + } + + // DELETE: api/Rabatte/5 + [HttpDelete("{id}")] + public async Task DeleteRabatt(int id) + { + if (_context.Rabatts == null) + { + return NotFound(); + } + var rabatt = await _context.Rabatts.FindAsync(id); + if (rabatt == null) + { + return NotFound(); + } + + _context.Rabatts.Remove(rabatt); + await _context.SaveChangesAsync(); + + return NoContent(); + } + + private bool RabattExists(int id) + { + return (_context.Rabatts?.Any(e => e.Idrabatt == id)).GetValueOrDefault(); + } + } +} diff --git a/src/WebApi/Data/WebApiContext.cs b/src/WebApi/Data/WebApiContext.cs new file mode 100644 index 0000000..15c55e4 --- /dev/null +++ b/src/WebApi/Data/WebApiContext.cs @@ -0,0 +1,230 @@ +using System; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore; +using WebApi.Models; + +namespace WebApi.Data; + +public partial class WebApiContext : DbContext +{ + public WebApiContext(DbContextOptions options) + : base(options) + { + } + + public virtual DbSet Allergies { get; set; } + + public virtual DbSet Bestellungspositions { get; set; } + + public virtual DbSet Kundes { get; set; } + + public virtual DbSet Menuitems { get; set; } + + public virtual DbSet Menuitemkategories { get; set; } + + public virtual DbSet Menuitemueberkategories { get; set; } + + public virtual DbSet Rabatts { get; set; } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder + .UseCollation("utf8_general_ci") + .HasCharSet("utf8"); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Idallergie).HasName("PRIMARY"); + + entity.ToTable("allergie"); + + entity.Property(e => e.Idallergie) + .ValueGeneratedNever() + .HasColumnType("int(11)") + .HasColumnName("IDAllergie"); + entity.Property(e => e.Beschreibung).HasMaxLength(45); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Idbestellung).HasName("PRIMARY"); + + entity.ToTable("bestellungsposition"); + + entity.HasIndex(e => e.KundeIdkunde, "fk_Bestellung_Kunde"); + + entity.HasIndex(e => e.RabattIdrabatt, "fk_Bestellungsposition_Rabatt1"); + + entity.Property(e => e.Idbestellung) + .ValueGeneratedNever() + .HasColumnType("int(11)") + .HasColumnName("IDBestellung"); + entity.Property(e => e.Datum).HasColumnType("datetime"); + entity.Property(e => e.KundeIdkunde) + .HasColumnType("int(11)") + .HasColumnName("Kunde_IDKunde"); + entity.Property(e => e.Menge).HasColumnType("int(11)"); + entity.Property(e => e.RabattIdrabatt) + .HasColumnType("int(11)") + .HasColumnName("Rabatt_IDRabatt"); + + entity.HasOne(d => d.KundeIdkundeNavigation).WithMany(p => p.Bestellungspositions) + .HasForeignKey(d => d.KundeIdkunde) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("fk_Bestellung_Kunde"); + + entity.HasOne(d => d.RabattIdrabattNavigation).WithMany(p => p.Bestellungspositions) + .HasForeignKey(d => d.RabattIdrabatt) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("fk_Bestellungsposition_Rabatt1"); + + entity.HasMany(d => d.MenuItemIdmenuItems).WithMany(p => p.BestellungspositionIdbestellungs) + .UsingEntity>( + "BestellungspositionHasMenuitem", + r => r.HasOne().WithMany() + .HasForeignKey("MenuItemIdmenuItem") + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("fk_Bestellungsposition_has_MenuItem_MenuItem1"), + l => l.HasOne().WithMany() + .HasForeignKey("BestellungspositionIdbestellung") + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("fk_Bestellungsposition_has_MenuItem_Bestellungsposition1"), + j => + { + j.HasKey("BestellungspositionIdbestellung", "MenuItemIdmenuItem") + .HasName("PRIMARY") + .HasAnnotation("MySql:IndexPrefixLength", new[] { 0, 0 }); + j.ToTable("bestellungsposition_has_menuitem"); + j.HasIndex(new[] { "MenuItemIdmenuItem" }, "fk_Bestellungsposition_has_MenuItem_MenuItem1"); + j.IndexerProperty("BestellungspositionIdbestellung") + .HasColumnType("int(11)") + .HasColumnName("Bestellungsposition_IDBestellung"); + j.IndexerProperty("MenuItemIdmenuItem") + .HasColumnType("int(11)") + .HasColumnName("MenuItem_IDMenuItem"); + }); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Idkunde).HasName("PRIMARY"); + + entity.ToTable("kunde"); + + entity.Property(e => e.Idkunde) + .ValueGeneratedNever() + .HasColumnType("int(11)") + .HasColumnName("IDKunde"); + entity.Property(e => e.Code) + .HasMaxLength(45) + .HasColumnName("code"); + entity.Property(e => e.Treuepunkte).HasColumnType("int(11)"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdmenuItem).HasName("PRIMARY"); + + entity.ToTable("menuitem"); + + entity.HasIndex(e => e.MenuItemKategorieIdmenuItemKategorie, "fk_MenuItem_MenuItemKategorie1"); + + entity.Property(e => e.IdmenuItem) + .ValueGeneratedNever() + .HasColumnType("int(11)") + .HasColumnName("IDMenuItem"); + entity.Property(e => e.Bezeichnung).HasMaxLength(45); + entity.Property(e => e.MenuItemKategorieIdmenuItemKategorie) + .HasColumnType("int(11)") + .HasColumnName("MenuItemKategorie_IDMenuItemKategorie"); + entity.Property(e => e.Preis).HasPrecision(8, 2); + entity.Property(e => e.Zusatzinformation).HasMaxLength(45); + + entity.HasOne(d => d.MenuItemKategorieIdmenuItemKategorieNavigation).WithMany(p => p.Menuitems) + .HasForeignKey(d => d.MenuItemKategorieIdmenuItemKategorie) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("fk_MenuItem_MenuItemKategorie1"); + + entity.HasMany(d => d.AllergieIdallergies).WithMany(p => p.MenuItemIdmenuItems) + .UsingEntity>( + "MenuitemHasAllergie", + r => r.HasOne().WithMany() + .HasForeignKey("AllergieIdallergie") + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("fk_MenuItem_has_Allergie_Allergie1"), + l => l.HasOne().WithMany() + .HasForeignKey("MenuItemIdmenuItem") + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("fk_MenuItem_has_Allergie_MenuItem1"), + j => + { + j.HasKey("MenuItemIdmenuItem", "AllergieIdallergie") + .HasName("PRIMARY") + .HasAnnotation("MySql:IndexPrefixLength", new[] { 0, 0 }); + j.ToTable("menuitem_has_allergie"); + j.HasIndex(new[] { "AllergieIdallergie" }, "fk_MenuItem_has_Allergie_Allergie1"); + j.IndexerProperty("MenuItemIdmenuItem") + .HasColumnType("int(11)") + .HasColumnName("MenuItem_IDMenuItem"); + j.IndexerProperty("AllergieIdallergie") + .HasColumnType("int(11)") + .HasColumnName("Allergie_IDAllergie"); + }); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdmenuItemKategorie).HasName("PRIMARY"); + + entity.ToTable("menuitemkategorie"); + + entity.HasIndex(e => e.MenuItemUeberkategorieIdmenuItemUeberkategorie, "fk_MenuItemKategorie_MenuItemUeberkategorie1"); + + entity.Property(e => e.IdmenuItemKategorie) + .ValueGeneratedNever() + .HasColumnType("int(11)") + .HasColumnName("IDMenuItemKategorie"); + entity.Property(e => e.Bezeichnung).HasMaxLength(45); + entity.Property(e => e.MenuItemUeberkategorieIdmenuItemUeberkategorie) + .HasColumnType("int(11)") + .HasColumnName("MenuItemUeberkategorie_IDMenuItemUeberkategorie"); + + entity.HasOne(d => d.MenuItemUeberkategorieIdmenuItemUeberkategorieNavigation).WithMany(p => p.Menuitemkategories) + .HasForeignKey(d => d.MenuItemUeberkategorieIdmenuItemUeberkategorie) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("fk_MenuItemKategorie_MenuItemUeberkategorie1"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdmenuItemUeberkategorie).HasName("PRIMARY"); + + entity.ToTable("menuitemueberkategorie"); + + entity.Property(e => e.IdmenuItemUeberkategorie) + .ValueGeneratedNever() + .HasColumnType("int(11)") + .HasColumnName("IDMenuItemUeberkategorie"); + entity.Property(e => e.Bezeichnung).HasMaxLength(45); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Idrabatt).HasName("PRIMARY"); + + entity.ToTable("rabatt"); + + entity.Property(e => e.Idrabatt) + .ValueGeneratedNever() + .HasColumnType("int(11)") + .HasColumnName("IDRabatt"); + entity.Property(e => e.GueltigkeitBis).HasColumnType("datetime"); + entity.Property(e => e.GueltigkeitVon).HasColumnType("datetime"); + entity.Property(e => e.Prozent).HasPrecision(8, 2); + }); + + OnModelCreatingPartial(modelBuilder); + } + + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); +} diff --git a/src/WebApi/Models/Allergie.cs b/src/WebApi/Models/Allergie.cs new file mode 100644 index 0000000..c19cf19 --- /dev/null +++ b/src/WebApi/Models/Allergie.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace WebApi.Models; + +public partial class Allergie +{ + public int Idallergie { get; set; } + + public string? Beschreibung { get; set; } + + public virtual ICollection MenuItemIdmenuItems { get; set; } = new List(); +} diff --git a/src/WebApi/Models/Bestellungsposition.cs b/src/WebApi/Models/Bestellungsposition.cs new file mode 100644 index 0000000..64c3048 --- /dev/null +++ b/src/WebApi/Models/Bestellungsposition.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; + +namespace WebApi.Models; + +public partial class Bestellungsposition +{ + public int Idbestellung { get; set; } + + public int? Menge { get; set; } + + public DateTime? Datum { get; set; } + + public int KundeIdkunde { get; set; } + + public int RabattIdrabatt { get; set; } + + public virtual Kunde KundeIdkundeNavigation { get; set; } = null!; + + public virtual Rabatt RabattIdrabattNavigation { get; set; } = null!; + + public virtual ICollection MenuItemIdmenuItems { get; set; } = new List(); +} diff --git a/src/WebApi/Models/Kunde.cs b/src/WebApi/Models/Kunde.cs new file mode 100644 index 0000000..7e9b9f0 --- /dev/null +++ b/src/WebApi/Models/Kunde.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; + +namespace WebApi.Models; + +public partial class Kunde +{ + public int Idkunde { get; set; } + + public string? Code { get; set; } + + public int? Treuepunkte { get; set; } + + public virtual ICollection Bestellungspositions { get; set; } = new List(); +} diff --git a/src/WebApi/Models/Menuitem.cs b/src/WebApi/Models/Menuitem.cs new file mode 100644 index 0000000..940ff67 --- /dev/null +++ b/src/WebApi/Models/Menuitem.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; + +namespace WebApi.Models; + +public partial class Menuitem +{ + public int IdmenuItem { get; set; } + + public string? Bezeichnung { get; set; } + + public string? Zusatzinformation { get; set; } + + public decimal? Preis { get; set; } + + public int MenuItemKategorieIdmenuItemKategorie { get; set; } + + public virtual Menuitemkategorie MenuItemKategorieIdmenuItemKategorieNavigation { get; set; } = null!; + + public virtual ICollection AllergieIdallergies { get; set; } = new List(); + + public virtual ICollection BestellungspositionIdbestellungs { get; set; } = new List(); +} diff --git a/src/WebApi/Models/Menuitemkategorie.cs b/src/WebApi/Models/Menuitemkategorie.cs new file mode 100644 index 0000000..87da64c --- /dev/null +++ b/src/WebApi/Models/Menuitemkategorie.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace WebApi.Models; + +public partial class Menuitemkategorie +{ + public int IdmenuItemKategorie { get; set; } + + public string? Bezeichnung { get; set; } + + public int MenuItemUeberkategorieIdmenuItemUeberkategorie { get; set; } + + public virtual Menuitemueberkategorie MenuItemUeberkategorieIdmenuItemUeberkategorieNavigation { get; set; } = null!; + + public virtual ICollection Menuitems { get; set; } = new List(); +} diff --git a/src/WebApi/Models/Menuitemueberkategorie.cs b/src/WebApi/Models/Menuitemueberkategorie.cs new file mode 100644 index 0000000..d182bce --- /dev/null +++ b/src/WebApi/Models/Menuitemueberkategorie.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace WebApi.Models; + +public partial class Menuitemueberkategorie +{ + public int IdmenuItemUeberkategorie { get; set; } + + public string? Bezeichnung { get; set; } + + public virtual ICollection Menuitemkategories { get; set; } = new List(); +} diff --git a/src/WebApi/Models/Rabatt.cs b/src/WebApi/Models/Rabatt.cs new file mode 100644 index 0000000..5aa0d67 --- /dev/null +++ b/src/WebApi/Models/Rabatt.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace WebApi.Models; + +public partial class Rabatt +{ + public int Idrabatt { get; set; } + + public decimal? Prozent { get; set; } + + public DateTime? GueltigkeitVon { get; set; } + + public DateTime? GueltigkeitBis { get; set; } + + public virtual ICollection Bestellungspositions { get; set; } = new List(); +} diff --git a/src/WebApi/Program.cs b/src/WebApi/Program.cs new file mode 100644 index 0000000..bad2fa8 --- /dev/null +++ b/src/WebApi/Program.cs @@ -0,0 +1,44 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Net.Http.Headers; +using WebApi.Data; + +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +builder.Services.AddDbContext(options => +{ + options.UseMySql(builder.Configuration.GetConnectionString("Y4FDB"), + Microsoft.EntityFrameworkCore.ServerVersion.Parse("8.0.23-mysql")); +}); + + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} + +//ip:port from y4f +app.UseCors(policy => + policy.WithOrigins("http://localhost:5248", "https://localhost:7138") + .AllowAnyMethod() + .WithHeaders(HeaderNames.ContentType) +); + + +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/src/WebApi/Properties/launchSettings.json b/src/WebApi/Properties/launchSettings.json new file mode 100644 index 0000000..5bfc5a7 --- /dev/null +++ b/src/WebApi/Properties/launchSettings.json @@ -0,0 +1,41 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:38447", + "sslPort": 44303 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5226", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:7076;http://localhost:5226", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/src/WebApi/README.md b/src/WebApi/README.md new file mode 100644 index 0000000..e69de29 diff --git a/src/WebApi/WebApi.csproj b/src/WebApi/WebApi.csproj new file mode 100644 index 0000000..276bbc4 --- /dev/null +++ b/src/WebApi/WebApi.csproj @@ -0,0 +1,24 @@ + + + + net7.0 + enable + enable + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + diff --git a/src/WebApi/appsettings.Development.json b/src/WebApi/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/src/WebApi/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/src/WebApi/appsettings.json b/src/WebApi/appsettings.json new file mode 100644 index 0000000..8cc16c3 --- /dev/null +++ b/src/WebApi/appsettings.json @@ -0,0 +1,12 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "Y4FDB": "Server=localhost;Database=y4f;Uid=user;Pwd=user" + } +} diff --git a/App.razor b/src/y4f/App.razor similarity index 100% rename from App.razor rename to src/y4f/App.razor diff --git a/Pages/Allergene.razor b/src/y4f/Pages/Allergene.razor similarity index 100% rename from Pages/Allergene.razor rename to src/y4f/Pages/Allergene.razor diff --git a/Pages/Allergene.razor.css b/src/y4f/Pages/Allergene.razor.css similarity index 95% rename from Pages/Allergene.razor.css rename to src/y4f/Pages/Allergene.razor.css index 45640b7..9708fc6 100644 --- a/Pages/Allergene.razor.css +++ b/src/y4f/Pages/Allergene.razor.css @@ -1,49 +1,49 @@ - - -.tg { - border-collapse: collapse; - border-spacing: 0; - margin-left: auto; - margin-right: auto; - } - - .tg td { - border-color: black; - border-style: solid; - border-width: 1px; - font-family: Arial, sans-serif; - font-size: 18px; - overflow: hidden; - padding: 10px 5px; - word-break: normal; - } - - .tg th { - border-color: black; - border-style: solid; - border-width: 1px; - font-family: Arial, sans-serif; - font-size: 18px; - font-weight: normal; - overflow: hidden; - padding: 10px 5px; - word-break: normal; - } - - .tg .tg-c3ow { - border-color: inherit; - text-align: center; - vertical-align: center; - } - - .tg .tg-0pky { - border-color: inherit; - text-align: center; - vertical-align: center; - } - -.icon { - width: 100%; - max-width: 100px; - height: auto; -} + + +.tg { + border-collapse: collapse; + border-spacing: 0; + margin-left: auto; + margin-right: auto; + } + + .tg td { + border-color: black; + border-style: solid; + border-width: 1px; + font-family: Arial, sans-serif; + font-size: 18px; + overflow: hidden; + padding: 10px 5px; + word-break: normal; + } + + .tg th { + border-color: black; + border-style: solid; + border-width: 1px; + font-family: Arial, sans-serif; + font-size: 18px; + font-weight: normal; + overflow: hidden; + padding: 10px 5px; + word-break: normal; + } + + .tg .tg-c3ow { + border-color: inherit; + text-align: center; + vertical-align: center; + } + + .tg .tg-0pky { + border-color: inherit; + text-align: center; + vertical-align: center; + } + +.icon { + width: 100%; + max-width: 100px; + height: auto; +} diff --git a/Pages/FetchData.razor b/src/y4f/Pages/FetchData.razor similarity index 100% rename from Pages/FetchData.razor rename to src/y4f/Pages/FetchData.razor diff --git a/Pages/Index.razor b/src/y4f/Pages/Index.razor similarity index 100% rename from Pages/Index.razor rename to src/y4f/Pages/Index.razor diff --git a/Pages/ShoppingCart.razor b/src/y4f/Pages/ShoppingCart.razor similarity index 100% rename from Pages/ShoppingCart.razor rename to src/y4f/Pages/ShoppingCart.razor diff --git a/Pages/Speisekarte.razor b/src/y4f/Pages/Speisekarte.razor similarity index 100% rename from Pages/Speisekarte.razor rename to src/y4f/Pages/Speisekarte.razor diff --git a/Pages/Speisekarte.razor.css b/src/y4f/Pages/Speisekarte.razor.css similarity index 100% rename from Pages/Speisekarte.razor.css rename to src/y4f/Pages/Speisekarte.razor.css diff --git a/src/y4f/Pages/TestFetchAllergienData.razor b/src/y4f/Pages/TestFetchAllergienData.razor new file mode 100644 index 0000000..05de358 --- /dev/null +++ b/src/y4f/Pages/TestFetchAllergienData.razor @@ -0,0 +1,51 @@ +@page "/TestFetchAllergienData" + +@inject HttpClient Http + + +Allergien + +

Allergien

+ +

This component demonstrates fetching data from the mysql server.

+ +@if (allergien == null) +{ +

Loading...

+} +else +{ + + + + + + + + + @foreach (var allergie in allergien) + { + + + + + } + +
IDBeschreibung
@allergie.Idallergie@allergie.Beschreibung
+} +@code { + private const string ServiceEndpoint = "https://localhost:7076/api/Allergien"; + private Allergie[]? allergien; + + protected override async Task OnInitializedAsync() + { + allergien = await Http.GetFromJsonAsync(ServiceEndpoint); + } + + public partial class Allergie + { + public int Idallergie { get; set; } + + public string? Beschreibung { get; set; } + } +} diff --git a/Pages/YummyPoints.razor b/src/y4f/Pages/YummyPoints.razor similarity index 100% rename from Pages/YummyPoints.razor rename to src/y4f/Pages/YummyPoints.razor diff --git a/Program.cs b/src/y4f/Program.cs similarity index 100% rename from Program.cs rename to src/y4f/Program.cs diff --git a/Properties/launchSettings.json b/src/y4f/Properties/launchSettings.json similarity index 100% rename from Properties/launchSettings.json rename to src/y4f/Properties/launchSettings.json diff --git a/src/y4f/README.md b/src/y4f/README.md new file mode 100644 index 0000000..d5b4f81 --- /dev/null +++ b/src/y4f/README.md @@ -0,0 +1 @@ +# y4f \ No newline at end of file diff --git a/Shared/Bestellabschluss.razor b/src/y4f/Shared/Bestellabschluss.razor similarity index 100% rename from Shared/Bestellabschluss.razor rename to src/y4f/Shared/Bestellabschluss.razor diff --git a/Shared/Bestellabschluss.razor.css b/src/y4f/Shared/Bestellabschluss.razor.css similarity index 100% rename from Shared/Bestellabschluss.razor.css rename to src/y4f/Shared/Bestellabschluss.razor.css diff --git a/Shared/Bestellbestätigung.razor b/src/y4f/Shared/Bestellbestätigung.razor similarity index 100% rename from Shared/Bestellbestätigung.razor rename to src/y4f/Shared/Bestellbestätigung.razor diff --git a/Shared/Bestellbestätigung.razor.css b/src/y4f/Shared/Bestellbestätigung.razor.css similarity index 100% rename from Shared/Bestellbestätigung.razor.css rename to src/y4f/Shared/Bestellbestätigung.razor.css diff --git a/Shared/Footer.razor b/src/y4f/Shared/Footer.razor similarity index 100% rename from Shared/Footer.razor rename to src/y4f/Shared/Footer.razor diff --git a/Shared/Footer.razor.css b/src/y4f/Shared/Footer.razor.css similarity index 100% rename from Shared/Footer.razor.css rename to src/y4f/Shared/Footer.razor.css diff --git a/Shared/Kontoverwaltung.razor b/src/y4f/Shared/Kontoverwaltung.razor similarity index 100% rename from Shared/Kontoverwaltung.razor rename to src/y4f/Shared/Kontoverwaltung.razor diff --git a/Shared/Kontoverwaltung.razor.css b/src/y4f/Shared/Kontoverwaltung.razor.css similarity index 100% rename from Shared/Kontoverwaltung.razor.css rename to src/y4f/Shared/Kontoverwaltung.razor.css diff --git a/Shared/MainLayout.razor b/src/y4f/Shared/MainLayout.razor similarity index 100% rename from Shared/MainLayout.razor rename to src/y4f/Shared/MainLayout.razor diff --git a/Shared/NavMenu.razor b/src/y4f/Shared/NavMenu.razor similarity index 100% rename from Shared/NavMenu.razor rename to src/y4f/Shared/NavMenu.razor diff --git a/Shared/Startseite.razor b/src/y4f/Shared/Startseite.razor similarity index 100% rename from Shared/Startseite.razor rename to src/y4f/Shared/Startseite.razor diff --git a/Shared/Startseite.razor.css b/src/y4f/Shared/Startseite.razor.css similarity index 100% rename from Shared/Startseite.razor.css rename to src/y4f/Shared/Startseite.razor.css diff --git a/Shared/SurveyPrompt.razor b/src/y4f/Shared/SurveyPrompt.razor similarity index 100% rename from Shared/SurveyPrompt.razor rename to src/y4f/Shared/SurveyPrompt.razor diff --git a/Shared/Yummy-Punkte.razor b/src/y4f/Shared/Yummy-Punkte.razor similarity index 100% rename from Shared/Yummy-Punkte.razor rename to src/y4f/Shared/Yummy-Punkte.razor diff --git a/Shared/Yummy-Punkte.razor.css b/src/y4f/Shared/Yummy-Punkte.razor.css similarity index 100% rename from Shared/Yummy-Punkte.razor.css rename to src/y4f/Shared/Yummy-Punkte.razor.css diff --git a/_Imports.razor b/src/y4f/_Imports.razor similarity index 100% rename from _Imports.razor rename to src/y4f/_Imports.razor diff --git a/wwwroot/assets/K-QR.png b/src/y4f/wwwroot/assets/K-QR.png similarity index 100% rename from wwwroot/assets/K-QR.png rename to src/y4f/wwwroot/assets/K-QR.png diff --git a/wwwroot/assets/Logo_new.png b/src/y4f/wwwroot/assets/Logo_new.png similarity index 100% rename from wwwroot/assets/Logo_new.png rename to src/y4f/wwwroot/assets/Logo_new.png diff --git a/wwwroot/assets/White-Circle.png b/src/y4f/wwwroot/assets/White-Circle.png similarity index 100% rename from wwwroot/assets/White-Circle.png rename to src/y4f/wwwroot/assets/White-Circle.png diff --git a/wwwroot/assets/ei.png b/src/y4f/wwwroot/assets/ei.png similarity index 100% rename from wwwroot/assets/ei.png rename to src/y4f/wwwroot/assets/ei.png diff --git a/wwwroot/assets/erdnuss.png b/src/y4f/wwwroot/assets/erdnuss.png similarity index 100% rename from wwwroot/assets/erdnuss.png rename to src/y4f/wwwroot/assets/erdnuss.png diff --git a/wwwroot/assets/fisch.png b/src/y4f/wwwroot/assets/fisch.png similarity index 100% rename from wwwroot/assets/fisch.png rename to src/y4f/wwwroot/assets/fisch.png diff --git a/wwwroot/assets/getreide.png b/src/y4f/wwwroot/assets/getreide.png similarity index 100% rename from wwwroot/assets/getreide.png rename to src/y4f/wwwroot/assets/getreide.png diff --git a/wwwroot/assets/krebstiere.png b/src/y4f/wwwroot/assets/krebstiere.png similarity index 100% rename from wwwroot/assets/krebstiere.png rename to src/y4f/wwwroot/assets/krebstiere.png diff --git a/wwwroot/assets/lupinen.png b/src/y4f/wwwroot/assets/lupinen.png similarity index 100% rename from wwwroot/assets/lupinen.png rename to src/y4f/wwwroot/assets/lupinen.png diff --git a/wwwroot/assets/milch.png b/src/y4f/wwwroot/assets/milch.png similarity index 100% rename from wwwroot/assets/milch.png rename to src/y4f/wwwroot/assets/milch.png diff --git a/wwwroot/assets/schalenfruechte.png b/src/y4f/wwwroot/assets/schalenfruechte.png similarity index 100% rename from wwwroot/assets/schalenfruechte.png rename to src/y4f/wwwroot/assets/schalenfruechte.png diff --git a/wwwroot/assets/sellerie.png b/src/y4f/wwwroot/assets/sellerie.png similarity index 100% rename from wwwroot/assets/sellerie.png rename to src/y4f/wwwroot/assets/sellerie.png diff --git a/wwwroot/assets/senf.png b/src/y4f/wwwroot/assets/senf.png similarity index 100% rename from wwwroot/assets/senf.png rename to src/y4f/wwwroot/assets/senf.png diff --git a/wwwroot/assets/sesam.png b/src/y4f/wwwroot/assets/sesam.png similarity index 100% rename from wwwroot/assets/sesam.png rename to src/y4f/wwwroot/assets/sesam.png diff --git a/wwwroot/assets/soja.png b/src/y4f/wwwroot/assets/soja.png similarity index 100% rename from wwwroot/assets/soja.png rename to src/y4f/wwwroot/assets/soja.png diff --git a/wwwroot/assets/sulfite.png b/src/y4f/wwwroot/assets/sulfite.png similarity index 100% rename from wwwroot/assets/sulfite.png rename to src/y4f/wwwroot/assets/sulfite.png diff --git a/wwwroot/assets/weichtiere.png b/src/y4f/wwwroot/assets/weichtiere.png similarity index 100% rename from wwwroot/assets/weichtiere.png rename to src/y4f/wwwroot/assets/weichtiere.png diff --git a/wwwroot/css/Site.css b/src/y4f/wwwroot/css/Site.css similarity index 100% rename from wwwroot/css/Site.css rename to src/y4f/wwwroot/css/Site.css diff --git a/wwwroot/css/app.css b/src/y4f/wwwroot/css/app.css similarity index 100% rename from wwwroot/css/app.css rename to src/y4f/wwwroot/css/app.css diff --git a/wwwroot/css/bootstrap/bootstrap.min.css b/src/y4f/wwwroot/css/bootstrap/bootstrap.min.css similarity index 100% rename from wwwroot/css/bootstrap/bootstrap.min.css rename to src/y4f/wwwroot/css/bootstrap/bootstrap.min.css diff --git a/wwwroot/css/bootstrap/bootstrap.min.css.map b/src/y4f/wwwroot/css/bootstrap/bootstrap.min.css.map similarity index 100% rename from wwwroot/css/bootstrap/bootstrap.min.css.map rename to src/y4f/wwwroot/css/bootstrap/bootstrap.min.css.map diff --git a/wwwroot/css/open-iconic/FONT-LICENSE b/src/y4f/wwwroot/css/open-iconic/FONT-LICENSE similarity index 100% rename from wwwroot/css/open-iconic/FONT-LICENSE rename to src/y4f/wwwroot/css/open-iconic/FONT-LICENSE diff --git a/wwwroot/css/open-iconic/ICON-LICENSE b/src/y4f/wwwroot/css/open-iconic/ICON-LICENSE similarity index 100% rename from wwwroot/css/open-iconic/ICON-LICENSE rename to src/y4f/wwwroot/css/open-iconic/ICON-LICENSE diff --git a/wwwroot/css/open-iconic/README.md b/src/y4f/wwwroot/css/open-iconic/README.md similarity index 100% rename from wwwroot/css/open-iconic/README.md rename to src/y4f/wwwroot/css/open-iconic/README.md diff --git a/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css b/src/y4f/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css similarity index 100% rename from wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css rename to src/y4f/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css diff --git a/wwwroot/css/open-iconic/font/fonts/open-iconic.eot b/src/y4f/wwwroot/css/open-iconic/font/fonts/open-iconic.eot similarity index 100% rename from wwwroot/css/open-iconic/font/fonts/open-iconic.eot rename to src/y4f/wwwroot/css/open-iconic/font/fonts/open-iconic.eot diff --git a/wwwroot/css/open-iconic/font/fonts/open-iconic.otf b/src/y4f/wwwroot/css/open-iconic/font/fonts/open-iconic.otf similarity index 100% rename from wwwroot/css/open-iconic/font/fonts/open-iconic.otf rename to src/y4f/wwwroot/css/open-iconic/font/fonts/open-iconic.otf diff --git a/wwwroot/css/open-iconic/font/fonts/open-iconic.svg b/src/y4f/wwwroot/css/open-iconic/font/fonts/open-iconic.svg similarity index 100% rename from wwwroot/css/open-iconic/font/fonts/open-iconic.svg rename to src/y4f/wwwroot/css/open-iconic/font/fonts/open-iconic.svg diff --git a/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf b/src/y4f/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf similarity index 100% rename from wwwroot/css/open-iconic/font/fonts/open-iconic.ttf rename to src/y4f/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf diff --git a/wwwroot/css/open-iconic/font/fonts/open-iconic.woff b/src/y4f/wwwroot/css/open-iconic/font/fonts/open-iconic.woff similarity index 100% rename from wwwroot/css/open-iconic/font/fonts/open-iconic.woff rename to src/y4f/wwwroot/css/open-iconic/font/fonts/open-iconic.woff diff --git a/wwwroot/css/shopping_cart.css b/src/y4f/wwwroot/css/shopping_cart.css similarity index 100% rename from wwwroot/css/shopping_cart.css rename to src/y4f/wwwroot/css/shopping_cart.css diff --git a/wwwroot/favicon.png b/src/y4f/wwwroot/favicon.png similarity index 100% rename from wwwroot/favicon.png rename to src/y4f/wwwroot/favicon.png diff --git a/wwwroot/icon-192.png b/src/y4f/wwwroot/icon-192.png similarity index 100% rename from wwwroot/icon-192.png rename to src/y4f/wwwroot/icon-192.png diff --git a/wwwroot/icon-512.png b/src/y4f/wwwroot/icon-512.png similarity index 100% rename from wwwroot/icon-512.png rename to src/y4f/wwwroot/icon-512.png diff --git a/wwwroot/index.html b/src/y4f/wwwroot/index.html similarity index 100% rename from wwwroot/index.html rename to src/y4f/wwwroot/index.html diff --git a/wwwroot/manifest.json b/src/y4f/wwwroot/manifest.json similarity index 100% rename from wwwroot/manifest.json rename to src/y4f/wwwroot/manifest.json diff --git a/wwwroot/sample-data/weather.json b/src/y4f/wwwroot/sample-data/weather.json similarity index 100% rename from wwwroot/sample-data/weather.json rename to src/y4f/wwwroot/sample-data/weather.json diff --git a/wwwroot/service-worker.js b/src/y4f/wwwroot/service-worker.js similarity index 100% rename from wwwroot/service-worker.js rename to src/y4f/wwwroot/service-worker.js diff --git a/wwwroot/service-worker.published.js b/src/y4f/wwwroot/service-worker.published.js similarity index 100% rename from wwwroot/service-worker.published.js rename to src/y4f/wwwroot/service-worker.published.js diff --git a/y4f.csproj b/src/y4f/y4f.csproj similarity index 100% rename from y4f.csproj rename to src/y4f/y4f.csproj diff --git a/y4f.sln b/y4f.sln index 7814467..60575ef 100644 --- a/y4f.sln +++ b/y4f.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.4.33205.214 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "y4f", "y4f.csproj", "{1B083D74-9507-4510-A532-8AAAD1FB6035}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "y4f", "src/y4f/y4f.csproj", "{1B083D74-9507-4510-A532-8AAAD1FB6035}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApi", "src\WebApi\WebApi.csproj", "{2261B5DE-7B90-46FA-9FC2-1924A64BAF3F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {1B083D74-9507-4510-A532-8AAAD1FB6035}.Debug|Any CPU.Build.0 = Debug|Any CPU {1B083D74-9507-4510-A532-8AAAD1FB6035}.Release|Any CPU.ActiveCfg = Release|Any CPU {1B083D74-9507-4510-A532-8AAAD1FB6035}.Release|Any CPU.Build.0 = Release|Any CPU + {2261B5DE-7B90-46FA-9FC2-1924A64BAF3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2261B5DE-7B90-46FA-9FC2-1924A64BAF3F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2261B5DE-7B90-46FA-9FC2-1924A64BAF3F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2261B5DE-7B90-46FA-9FC2-1924A64BAF3F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE