Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class NewGameDefinitionViewModel
- {
- public string Name { get; set; }
- public string Description { get; set; }
- public string ReturnUrl { get; set; }
- public int BoardGameGeekObjectId { get; set; }
- }
- public class GameDefinition : SecuredEntityWithTechnicalKey<int>
- {
- public GameDefinition()
- {
- Active = true;
- DateCreated = DateTime.UtcNow;
- }
- public override int Id { get; set; }
- public override int GamingGroupId { get; set; }
- public int? BoardGameGeekObjectId { get; set; }
- [Required]
- public string Name { get; set; }
- public string Description { get; set; }
- public bool Active { get; set; }
- public DateTime DateCreated { get; set; }
- public virtual IList<PlayedGame> PlayedGames { get; set; }
- public virtual GamingGroup GamingGroup { get; set; }
- public int? ChampionId { get; set; }
- public int? PreviousChampionId { get; set; }
- public virtual Champion Champion { get; set; }
- public virtual Champion PreviousChampion { get; set; }
- }
- //this throws an AutoMapper.AutoMapperConfigurationException because of unmapped fields. Just want to ignore those
- var gameDefinition = Mapper.Map<NewGameDefinitionViewModel, GameDefinition>(newGameDefinitionViewModel);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement