public static SketchViewModel AsSketchViewModel(this Sketch sketch) { var viewModel = new SketchViewModel { Id = sketch.Id, UserId = sketch.UserId, //Title = sketch.Title, Extension = sketch.Extension, //PageCount = sketch.PageCount, //PageHeight = sketch.PageHeight }; return(viewModel); }
public static Sketch AsSketch(this SketchViewModel viewModel) { var sketch = new Sketch { Id = viewModel.Id, UserId = viewModel.UserId, //Title = viewModel.Title, Extension = viewModel.Extension, //PageCount = viewModel.PageCount, //PageHeight = viewModel.PageHeight }; return(sketch); }