using AutoMapper; using BookingWeb.DB.Model; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace BookingWeb.Models { public class OpLogListViewModel { public int LogId { get; set; } public string OpTime { get; set; } public string OpUserName { get; set; } public string OpCompanyName { get; set; } public string Module { get; set; } public string Type { get; set; } public string BillNO { get; set; } public string MBLNO { get; set; } } public static class OpLogListViewModelExt { public static OpLogListViewModel AsListViewModel(this OP_LOG src) { return Mapper.Map<OpLogListViewModel>(src); } public static List<OpLogListViewModel> AsListViewModelList(this IEnumerable<OP_LOG> src) { return Mapper.Map<List<OpLogListViewModel>>(src); } } }