Browse Source

Merge branch 'master' of https://gitea.nek0.eu/nek0/BuecherwurmAPI into David

David
David Renner 11 months ago
parent
commit
dd4541f720
  1. 8
      Models/Book.cs
  2. 10
      Models/KatalogModel.cs

8
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;}
}
}

10
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;
}

Loading…
Cancel
Save