This commit is contained in:
2023-12-16 21:18:01 +02:00
parent 775146ee86
commit 2feaf50802
46 changed files with 641 additions and 429 deletions
+12
View File
@@ -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))
;
}
}