public OrderState Map(CreateOrEditViewModel createOrEdit)
        {
            OrderState orderState = new OrderState();

            if (createOrEdit.Id != null)
            {
                orderState = this.RequestHandler.Storage.GetRepository <IOrderStateRepository>().WithKey((int)createOrEdit.Id);
            }

            orderState.Code     = createOrEdit.Code;
            orderState.Position = createOrEdit.Position;
            return(orderState);
        }
 public OrderState Map(OrderState orderState, CreateOrEditViewModel createOrEdit)
 {
     orderState.Code     = createOrEdit.Code;
     orderState.Position = createOrEdit.Position;
     return(orderState);
 }