15 lines
344 B
C#
15 lines
344 B
C#
using AutoMapper;
|
|
using Diary.Component.Entries.Repository;
|
|
|
|
namespace Diary.Component.Entries.Service
|
|
{
|
|
public class EntryMappings : Profile
|
|
{
|
|
public EntryMappings()
|
|
{
|
|
CreateMap<CreateEntryResource, Entry>();
|
|
CreateMap<Entry, EntryResource>()
|
|
.ForMember(dest => dest.Date, opt => opt.MapFrom(src => src.Date.Date));
|
|
}
|
|
}
|
|
} |