28 lines
645 B
C#
28 lines
645 B
C#
namespace MyOffice.Web.Models.Currency
|
|
{
|
|
using Data.Models.Currencies;
|
|
using Microsoft.AspNetCore.Mvc.ModelBinding.Binders;
|
|
|
|
public class CurrencyGlobalViewModel
|
|
{
|
|
public string Id { get; set; } = null!;
|
|
public string Name { get; set; } = null!;
|
|
public int Quantity { get; set; }
|
|
public string Symbol { get; set; } = null!;
|
|
}
|
|
|
|
public static class CurrencyGlobalViewModelExtensions
|
|
{
|
|
public static CurrencyGlobalViewModel ToModel(this CurrencyGlobal input)
|
|
{
|
|
return new CurrencyGlobalViewModel
|
|
{
|
|
Id = input.Id,
|
|
Name = input.Name,
|
|
Quantity = input.DefaultQuantity,
|
|
Symbol = input.Symbol,
|
|
};
|
|
}
|
|
}
|
|
}
|