public object Update(Guid global_setting_id, sdk.GlobalSetting globalsetting)
        {
            return(base.ExecuteFunction <object>("Update", delegate()
            {
                this.ValidateNotNull(globalsetting, "GlobalSetting");
                this.ValidateRouteMatch(global_setting_id, globalsetting.global_setting_id, "GlobalSetting");

                globalsetting.global_setting_id = global_setting_id;
                dm.GlobalSetting update = globalsetting.ToDomainModel();


                update = this.API.Direct.GlobalSettings.Update(update);


                sdk.GlobalSetting existing = this.API.Direct.GlobalSettings.GetById(update.global_setting_id).ToSDKModel();

                return base.Http200(new ItemResult <sdk.GlobalSetting>()
                {
                    success = true,
                    item = existing
                });
            }));
        }
        public object Create(sdk.GlobalSetting globalsetting)
        {
            return(base.ExecuteFunction <object>("Create", delegate()
            {
                this.ValidateNotNull(globalsetting, "GlobalSetting");

                dm.GlobalSetting insert = globalsetting.ToDomainModel();


                insert = this.API.Direct.GlobalSettings.Insert(insert);



                sdk.GlobalSetting result = insert.ToSDKModel();

                return base.Http201(new ItemResult <sdk.GlobalSetting>()
                {
                    success = true,
                    item = result
                }
                                    , string.Format("api/globalsetting/{0}", globalsetting.global_setting_id));
            }));
        }