This commit is contained in:
15
HanyadikHetVan/Profiles/FunFactProfile.cs
Normal file
15
HanyadikHetVan/Profiles/FunFactProfile.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using AutoMapper;
|
||||
using HanyadikHetVan.Data.Entities;
|
||||
using HanyadikHetVan.DTO;
|
||||
|
||||
namespace HanyadikHetVan.Profiles
|
||||
{
|
||||
public class FunFactProfile : Profile
|
||||
{
|
||||
public FunFactProfile()
|
||||
{
|
||||
CreateMap<FunFact, FunFactDTO>();
|
||||
CreateMap<FunFactDTO, FunFact>().ForMember(x => x.Id, options => options.Ignore()).ForMember(x => x.WeeklyTimeSpanId, options => options.Ignore()).ForMember(x => x.Id, options => options.Ignore());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +1,6 @@
|
||||
using AutoMapper;
|
||||
using HanyadikHetVan.Data.Entities;
|
||||
using HanyadikHetVan.DTO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HanyadikHetVan.Profiles
|
||||
{
|
||||
|
@ -1,15 +0,0 @@
|
||||
using AutoMapper;
|
||||
using HanyadikHetVan.Data.Entities;
|
||||
using HanyadikHetVan.DTO;
|
||||
|
||||
namespace HanyadikHetVan.Profiles
|
||||
{
|
||||
public class PurseProfile : Profile
|
||||
{
|
||||
public PurseProfile()
|
||||
{
|
||||
CreateMap<Purse, PurseDTO>();
|
||||
CreateMap<PurseDTO, Purse>().ForMember(x => x.User, options => options.Ignore()).ForMember(x => x.UserId, options => options.Ignore()).ForMember(x => x.Id, options => options.Ignore());
|
||||
}
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@ namespace HanyadikHetVan.Profiles
|
||||
public WeeklyTimeSpanProfile()
|
||||
{
|
||||
CreateMap<WeeklyTimeSpan, WeeklyTimeSpanDTO>();
|
||||
CreateMap<WeeklyTimeSpanDTO, WeeklyTimeSpan>().ForMember(x => x.Id, options => options.Ignore()).ForMember(x => x.Owner, options => options.Ignore()).ForMember(x => x.OwnerId, options => options.Ignore());
|
||||
CreateMap<WeeklyTimeSpanDTO, WeeklyTimeSpan>().ForMember(x => x.Id, options => options.Ignore()).ForMember(x => x.User, options => options.Ignore()).ForMember(x => x.UserId, options => options.Ignore());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user