public static ClassTopic ToEntity(ViewClassTopic model) { ClassTopic item = new ClassTopic(); item.Id = model.Id; item.ClassID = model.ClassID; item.TopicID = model.TopicID; item.IsDeleted = model.IsDeleted; item.CreateTime = model.CreateTime; return(item); }
public static ViewClassTopic ToViewModel(ClassTopic model) { if (model == null) { return(null); } ViewClassTopic item = new ViewClassTopic(); item.Id = model.Id; item.ClassID = model.ClassID; item.TopicID = model.TopicID; item.IsDeleted = model.IsDeleted; item.CreateTime = model.CreateTime; return(item); }