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(model); } public static List AsListViewModelList(this IEnumerable model) { return Mapper.Map>(model); } } }