Skip to content

Commit 37a4296

Browse files
committed
model type changes
1 parent 96132de commit 37a4296

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/NetCoreStack.Api.Hosting/BsonDataInitializer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static void InitializeMusicStoreMongoDb(IServiceProvider serviceProvider)
1818
var albums = BsonSampleData.GetAlbums(imgUrl, BsonSampleData.Genres, BsonSampleData.Artists);
1919
if (!albums.Any())
2020
{
21-
db.MongoDatabase.DropCollection(BsonCollectionHelper.GetCollectionName<AlbumBson>());
21+
db.MongoDatabase.DropCollection(db.CollectionNameSelector.GetCollectionName<AlbumBson>());
2222
db.Collection<AlbumBson>().InsertMany(albums);
2323
}
2424
}

test/NetCoreStack.Api.Hosting/Controllers/AlbumController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public async Task<AlbumViewModel> SaveAlbum([FromBody]AlbumViewModel model)
8080
var objectState = ObjectState.Added;
8181
if (!model.IsNew)
8282
{
83-
id = model.Id.Value;
83+
id = model.Id;
8484
objectState = ObjectState.Modified;
8585
}
8686

test/NetCoreStack.Domain.Contracts/AlbumViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace NetCoreStack.Domain.Contracts
55
{
6-
public class AlbumViewModel : BaseViewModel
6+
public class AlbumViewModel : CollectionModel
77
{
88
[PropertyDescriptor(EnableFilter = true, IsSelectable = true)]
99
[Required]

0 commit comments

Comments
 (0)