public TabViewModel Build(Tab tab) { return new TabViewModel() { Id = tab.Id, Name = tab.Name, Position = tab.Position }; }
public Tab Map(CreateOrEditViewModel createOrEdit) { Tab tab = new Tab(); if (createOrEdit.Id != null) tab = this.handler.Storage.GetRepository<ITabRepository>().WithKey((int)createOrEdit.Id); else tab.ClassId = createOrEdit.ClassId; tab.Name = createOrEdit.Name; tab.Position = createOrEdit.Position; return tab; }