Skip to content

GodelTech/GodelTech.Data.AutoMapper

Repository files navigation

GodelTech.Data.AutoMapper

Description

GodelTech.Data.AutoMapper is a .NET library that integrates AutoMapper with GodelTech.Data, providing a seamless way to map data entities. It implements the IDataMapper interface from GodelTech.Data using the AutoMapper NuGet package, allowing efficient and straightforward object-to-object mapping.

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);
    }
}

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Library for using AutoMapper with GodelTech.Data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •