Browse Source
Merge pull request #2713 from yunusd/dev
fix docs wrong code that causes to all test failed
pull/2766/head
Halil İbrahim Kalkan
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
16 additions and
16 deletions
-
docs/en/Tutorials/AspNetCore-Mvc/Part-I.md
-
docs/en/Tutorials/AspNetCore-Mvc/Part-III.md
|
|
|
@ -50,6 +50,20 @@ namespace Acme.BookStore |
|
|
|
public DateTime PublishDate { get; set; } |
|
|
|
|
|
|
|
public float Price { get; set; } |
|
|
|
|
|
|
|
protected Book() |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public Book(Guid id, string name, BookType type, DateTime publishDate, float price) |
|
|
|
:base(id) |
|
|
|
{ |
|
|
|
Name = name; |
|
|
|
Type = type; |
|
|
|
PublishDate = publishDate; |
|
|
|
Price = price; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
```` |
|
|
|
|
|
|
|
@ -57,25 +57,11 @@ namespace Acme.BookStore |
|
|
|
public async Task SeedAsync(DataSeedContext context) |
|
|
|
{ |
|
|
|
await _bookRepository.InsertAsync( |
|
|
|
new Book |
|
|
|
{ |
|
|
|
Id = _guidGenerator.Create(), |
|
|
|
Name = "Test book 1", |
|
|
|
Type = BookType.Fantastic, |
|
|
|
PublishDate = new DateTime(2015, 05, 24), |
|
|
|
Price = 21 |
|
|
|
} |
|
|
|
new Book(_guidGenerator.Create(), "Test book 1", BookType.Fantastic, new DateTime(2015, 05, 24), 21) |
|
|
|
); |
|
|
|
|
|
|
|
await _bookRepository.InsertAsync( |
|
|
|
new Book |
|
|
|
{ |
|
|
|
Id = _guidGenerator.Create(), |
|
|
|
Name = "Test book 2", |
|
|
|
Type = BookType.Science, |
|
|
|
PublishDate = new DateTime(2014, 02, 11), |
|
|
|
Price = 15 |
|
|
|
} |
|
|
|
new Book(_guidGenerator.Create(), "Test book 2", BookType.Science, new DateTime(2014, 02, 11), 15) |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|