From 3e369eff83ed95a3bf3bb309cf89f19ddd9a8853 Mon Sep 17 00:00:00 2001 From: Naumann Date: Thu, 4 Jun 2020 09:34:31 +0200 Subject: [PATCH] changed ENum to long --- Models/Book.cs | 8 ++++---- Models/KatalogModel.cs | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Models/Book.cs b/Models/Book.cs index 3e605de..021a709 100644 --- a/Models/Book.cs +++ b/Models/Book.cs @@ -13,10 +13,10 @@ namespace BuecherwurmAPI.Models public long Year {get; set;} [Key, Required] public long ProductId { get; set; } - public CategoryEnum Category { get; set; } + public long Category { get; set; } public string ImageLink { get; set; } public long LendTime {get; set;} - public LendTypeEnum LendType {get; set;} + public long LendType {get; set;} } public class BookPost @@ -28,10 +28,10 @@ namespace BuecherwurmAPI.Models public string Language {get; set;} public long Pages {get; set;} public long Year {get; set;} - public CategoryEnum Category { get; set; } + public long Category { get; set; } public string ImageLink { get; set; } public long LendTime {get; set;} - public LendTypeEnum LendType {get; set;} + public long LendType {get; set;} } } \ No newline at end of file diff --git a/Models/KatalogModel.cs b/Models/KatalogModel.cs index 64f2347..65f4dfd 100644 --- a/Models/KatalogModel.cs +++ b/Models/KatalogModel.cs @@ -34,7 +34,7 @@ namespace BuecherwurmAPI.Models { books.Add(new Book { - Name = (string) dataReader["Books"], + Name = (string) dataReader["Name"], Author = (string) dataReader["Author"], Country = (string) dataReader["Country"], Link = (string) dataReader["Link"], @@ -42,10 +42,10 @@ namespace BuecherwurmAPI.Models Pages = (long) dataReader["Pages"], Year = (long) dataReader["Year"], ProductId = (long) dataReader["ProductId"], - Category = (CategoryEnum) dataReader["Category"], + Category = (long) dataReader["Category"], ImageLink = (string) dataReader["ImageLink"], LendTime = (long) dataReader["LendTime"], - LendType = (LendTypeEnum) dataReader["LendType"] + LendType = (long) dataReader["LendType"] }); } } @@ -70,10 +70,10 @@ namespace BuecherwurmAPI.Models Pages = (long) dataReader["Pages"], Year = (long) dataReader["Year"], ProductId = (long) dataReader["ProductId"], - Category = (CategoryEnum) dataReader["Category"], + Category = (long) dataReader["Category"], ImageLink = (string) dataReader["ImageLink"], LendTime = (long) dataReader["LendTime"], - LendType = (LendTypeEnum) dataReader["LendType"] + LendType = (long) dataReader["LendType"] }; return book; }