public MappingProfile(SlidEnglishContext context)
        {
            CreateMap <Domain.Word, Shared.Word>()
            .ForMember(dest => dest.Synonyms,
                       opt => opt.MapFrom(src => src.Synonyms.Select(x => x.Text)));

            CreateMap <Shared.Word, Domain.Word>()
            .ForMember(dest => dest.Synonyms,
                       opt => opt.MapFrom(src => src.Synonyms == null ? null : src.Synonyms.Select(synonym => context.Word.Where(x => x.Text == synonym).FirstOrDefault())));
        }
 public WordsController(IMapper mapper, SlidEnglishContext context)
 {
     _mapper  = mapper;
     _context = context;
 }