using AutoMapper; using DSWeb.Areas.Dispatch.DB; using DSWeb.Dispatch.DAL; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace DSWeb.Areas.Dispatch.Models { public class DispInfoClientAuditViewModel { public string GID { get; set; } public string Name { get; set; } public string Tel { get; set; } public string CompanyName { get; set; } public bool IsAudit { get; set; } public string AuditStatsName { get; set; } public string InfoClient { get; set; } } public static class DispInfoClientAuditViewModelExt { public static DispInfoClientAuditViewModel AsAuditViewModel(this DispInfoClient model) { return Mapper.Map(model); } public static List AsAuditViewModelList(this IEnumerable model) { return Mapper.Map, List>(model); } public static DispInfoClient AsModel(this DispInfoClientAuditViewModel model) { return Mapper.Map(model); } public static DispInfoClient AsModel(this DispInfoClientAuditViewModel model, DispInfoClient dest) { return Mapper.Map(model, dest); } } }