dodanie edycji

This commit is contained in:
s426150 2019-06-01 14:12:39 +02:00
parent 18483856f2
commit 4d3f29deb4
11 changed files with 4 additions and 0 deletions

Binary file not shown.

View File

@ -87,6 +87,8 @@ namespace Book_club.Controllers
{
if (ModelState.IsValid)
{
var currentUserId = User.Identity.GetUserId();
book.UserId = currentUserId;
db.Entry(book).State = EntityState.Modified;
db.SaveChanges();
return RedirectToAction("Index");

View File

@ -17,6 +17,8 @@ namespace Book_club.Models
// [MaxValue(2020, "Value can't be more than 10")]
public int YearProducktion { get; set; }
//public DateTime ReadDate { get; set; }
public int AgeLimit { get; set; }
public bool IsChildBook { get; set; }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.