using Microsoft.AspNetCore.Http; namespace Landmark.OLA.Models.Loan { public class DocumentUploadFromLoanApplication { public IFormFile File { get; set; } public string Section { get; set; } public string SectionId { get; set; } public string Description { get; set; } public static bool IsNullOrEmpty(DocumentUploadFromLoanApplication file) { if(file == null || file.File == null || String.IsNullOrEmpty(file.SectionId) || String.IsNullOrEmpty(file.Description)) { return true; } if(file.File.Length == 0 || String.IsNullOrEmpty(file.File.FileName)) { return true; } return false; } } }