Files
myoffice/MyOffice.Web/Models/Motion/AccountControllerProfile.cs
2023-12-16 21:18:01 +02:00

18 lines
514 B
C#

namespace MyOffice.Web.Models.Motion;
using AutoMapper;
using Data.Models.Accounts;
using Services.Account.Domain;
public class AccountControllerProfile : Profile
{
public AccountControllerProfile()
{
CreateMap<Motion, MotionViewModel>()
.ForMember(x => x.Date, o => o.MapFrom(x => x.DateTime))
.ForMember(x => x.Item, o => o.MapFrom(x => x.Item.ItemGlobal.Name))
.ForMember(x => x.Plus, o => o.MapFrom(x => x.AmountPlus))
.ForMember(x => x.Minus, o => o.MapFrom(x => x.AmountMinus))
;
}
}