/// <summary> /// Written: 02/12/2013 /// </summary> /// <param name="settingName"></param> /// <param name="settingDescription"></param> /// <returns></returns> public int CreateSetting(string settingName, string settingDescription) { var newSetting = new Setting() { SettingName = settingName, SettingDescription = settingDescription, CreateDate = DateTime.Now, Creator = 1, Active = "Always" }; db.Settings.Add(newSetting); db.SaveChanges(); return 2; }
/// <summary> /// Creation of a new setting /// NOT USED FUTURE DEVELOPEMENT /// </summary> /// <param name="settingName"></param> /// <param name="settingDescription"></param> /// <returns></returns> public int CreateSetting(string settingName, string settingDescription) { //NEW SETTING created Id generation not used var id = _dBase.Settings.Count(); id += 1; var newSetting = new Setting { SettingsId = id, SettingName = settingName, SettingDescription = settingDescription, CreateDate = DateTime.Now, Creator = 1, Active = "Always" }; //settinga added _dBase.Settings.Add(newSetting); _dBase.SaveChanges(); return id; }