fix
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
namespace MyOffice.Web.Models.Item;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using AutoMapper;
|
||||
using MyOffice.Services.Account.Domain;
|
||||
|
||||
public class ItemViewModel : BaseViewModel
|
||||
{
|
||||
@@ -15,3 +17,13 @@ public class ItemViewModel : BaseViewModel
|
||||
|
||||
public string? AccountId { get; set; }
|
||||
}
|
||||
|
||||
public class ItemViewModelProfile: Profile
|
||||
{
|
||||
public ItemViewModelProfile()
|
||||
{
|
||||
CreateMap<ItemDto, ItemViewModel>()
|
||||
.ForMember(x => x.Category, o => o.MapFrom(x => x.Category!.Name))
|
||||
;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user