mirror of
https://github.com/TomasiDeveloping/PlayerManagement.git
synced 2026-04-16 09:12:20 +00:00
20 lines
582 B
C#
20 lines
582 B
C#
using Application.DataTransferObjects.Note;
|
|
using AutoMapper;
|
|
using Database.Entities;
|
|
|
|
namespace Application.Profiles;
|
|
|
|
public class NoteProfile : Profile
|
|
{
|
|
public NoteProfile()
|
|
{
|
|
CreateMap<Note, NoteDto>();
|
|
|
|
CreateMap<UpdateNoteDto, Note>()
|
|
.ForMember(des => des.ModifiedOn, opt => opt.MapFrom(src => DateTime.Now));
|
|
|
|
CreateMap<CreateNoteDto, Note>()
|
|
.ForMember(des => des.Id, opt => opt.MapFrom(src => Guid.CreateVersion7()))
|
|
.ForMember(des => des.CreatedOn, opt => opt.MapFrom(src => DateTime.Now));
|
|
}
|
|
} |