Skip to content

Commit c5fe7f9

Browse files
edit Book header, source image local
1 parent 17a65f1 commit c5fe7f9

File tree

9 files changed

+12
-546
lines changed

9 files changed

+12
-546
lines changed

Diff for: BookStore.BLL.RepositoryService/obj/Debug/BookStore.BLL.RepositoryService.csproj.FileListAbsolute.txt

-23
This file was deleted.

Diff for: BookStore.DAL.EntityFramework/EfBookRepository.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,16 @@ public override void Save(Book obj)
118118
}
119119
public override void Create(Book obj)
120120
{
121-
ICollection<Author> authors = obj.Authors;
122-
obj.Authors = new List<Author>();
121+
ICollection<Author> authors = obj.BookAuthors;
122+
obj.BookAuthors = new List<Author>();
123123
foreach (var author in authors)
124124
{
125125
Author authorForSave = Context
126126
.Authors
127127
.FirstOrDefault(a => a.Last_Name == author.Last_Name && author.First_Name == a.First_Name) ??
128128
new Author() { Last_Name = author.Last_Name, First_Name = author.First_Name, Middle_Name = author.Middle_Name };
129-
130-
obj.Authors.Add(authorForSave);
129+
130+
obj.BookAuthors.Add(authorForSave);
131131
}
132132
Context.Books.Add(obj);
133133
Context.SaveChanges();

Diff for: BookStore.DAL.EntityFramework/obj/Debug/BookStore.DAL.EntityFramework.csproj.FileListAbsolute.txt

-24
This file was deleted.

Diff for: BookStore.DAL/obj/Debug/BookStore.DAL.csproj.FileListAbsolute.txt

-16
This file was deleted.

Diff for: BookStore.Domain/obj/Debug/BookStore.DO.csproj.FileListAbsolute.txt

-27
This file was deleted.

Diff for: BookStore/Views/Shared/BookHeader.cshtml

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@
1212
</div>
1313
<div class="col-md-2 col-lg-2 smallimage">
1414
<a href="@Url.Action("BookDetails", "Book", new {bookId = @Model.Book_ID})">
15-
<img src="@Model.Image_url" class="img-thumbnail" />
15+
@if (Model.Image_url != null)
16+
{
17+
<img src="@Url.Content(Model.Image_url)" class="img-thumbnail" alt="images"/>
18+
}
19+
else
20+
{
21+
<img src="@Url.Content("~/Content/Images/imgBook0.jpg")" class="img-thumbnail" alt="images" />
22+
}
1623
</a>
1724
</div>
1825
</div>

Diff for: BookStore/bin/BookStore.dll.config

-133
This file was deleted.

0 commit comments

Comments
 (0)