Skip to content

GodelTech/GodelTech.Data.AutoMapper

Repository files navigation

GodelTech.Data.AutoMapper

Library for using AutoMapper with GodelTech.Data.

Overview

GodelTech.Data.AutoMapper implements GodelTech.Data IDataMapper interface using AutoMapper NuGet package. It allows to use mapping of TEntity to TModel.

public class DataMapper : IDataMapper
{
    private readonly IMapper _mapper;

    public DataMapper(IMapper mapper)
    {
        _mapper = mapper;
    }

    public IQueryable<TDestination> Map<TDestination>(IQueryable source)
    {
        return _mapper.ProjectTo<TDestination>(source);
    }
}

About

Library for using AutoMapper with GodelTech.Data

Resources

License

Stars

Watchers

Forks

Packages

No packages published