public static GImageViewModel MapToViewModelObject(_Proxy.tbl_FabricImage objectToBeMapped, string fabricCode) { var temp = new GImageViewModel(fabricCode) { _ImageState = Helpers.Enums.ImageCondition.LoadedFromDb, G_FabricId = objectToBeMapped.FabricCode, G_Image = objectToBeMapped.FabImage, G_ImageDescreption = objectToBeMapped.ImageDesc, _GIserial = objectToBeMapped.Iserial }; return(temp); }
public static _Proxy.tbl_FabricImage MapToModelObject(GImageViewModel objectToBeMapped) { var temp = new _Proxy.tbl_FabricImage { FabricCode = objectToBeMapped.G_FabricId, FabImage = objectToBeMapped.G_Image, ImageDesc = objectToBeMapped.G_ImageDescreption }; if (objectToBeMapped._GIserial != null) { temp.Iserial = (int)objectToBeMapped._GIserial; } return(temp); }