You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/BookingJieFeng/Models/TemplateListViewModel.cs

31 lines
773 B
C#

3 years ago
using AutoMapper;
using BookingJieFeng.DB.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace BookingJieFeng.Models
{
public class TemplateListViewModel
{
public string GID { get; set; }
public string NAME { get; set; }
public string CONTENT { get; set; }
}
public static class TemplateListViewModelExt
{
public static TemplateListViewModel AsListViewModel(this OP_TEMPLATE model)
{
return Mapper.Map<TemplateListViewModel>(model);
}
public static List<TemplateListViewModel> AsListViewModelList(this IEnumerable<OP_TEMPLATE> model)
{
return Mapper.Map<List<TemplateListViewModel>>(model);
}
}
}