30 lines
667 B
C#
30 lines
667 B
C#
using Contracts.BindingModels;
|
|
using DataModels.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using static System.Net.Mime.MediaTypeNames;
|
|
|
|
namespace Contracts.ViewModels
|
|
{
|
|
public class MediaFileViewModel
|
|
{
|
|
public Guid Id { get; set; }
|
|
public required byte[] Image { get; set; }
|
|
public Guid ProductId { get; set; }
|
|
public string ProductName { get; set; } = string.Empty;
|
|
public MediaFileBindingModel GetBindingModel()
|
|
{
|
|
return new MediaFileBindingModel
|
|
{
|
|
Id = Id,
|
|
Image = Image,
|
|
ProductId = ProductId
|
|
};
|
|
}
|
|
|
|
}
|
|
}
|