mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-22 17:27:48 +00:00
feed table added
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using AutoMapper;
|
||||
using System.Collections.Generic;
|
||||
using AutoMapper;
|
||||
using LiveGameFeed.Models;
|
||||
|
||||
namespace LiveGameFeed.Core.Mappings
|
||||
@@ -8,7 +9,9 @@ namespace LiveGameFeed.Core.Mappings
|
||||
protected override void Configure()
|
||||
{
|
||||
Mapper.CreateMap<Match, MatchViewModel>()
|
||||
.ForMember(m => m.Type, map => map.MapFrom(m => m.Type.ToString()));
|
||||
.ForMember(vm => vm.Type, map => map.MapFrom(m => m.Type.ToString()))
|
||||
.ForMember(vm => vm.Feeds, map => map.MapFrom(m =>
|
||||
Mapper.Map<ICollection<Feed>, ICollection<FeedViewModel>>(m.Feeds)));
|
||||
Mapper.CreateMap<Feed, FeedViewModel>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user