public static void RSAWReportSettingsSave(bool value)
{
string SystemValue = string.Empty;
SystemValue = value == true ? "1" : "0";
SystemSettings objSystem = null;
objSystem = SessionManager.BPIContext.SystemSettings.Where(o => o.Name == RSAWHelper.RSAW_Report_Name_Changed).FirstOrDefault();
if (objSystem != null)
{
objSystem.Value = SystemValue;
}
else
{
objSystem = new SystemSettings();
objSystem.Name = RSAWHelper.RSAW_Report_Name_Changed;
objSystem.Value = SystemValue;
SessionManager.Current.CurrentContext.AddToSystemSettings(objSystem);
}
SessionManager.BPIContext.SaveChanges();
}
Could i optimize this method ?if yes then how? it is insert/update method actually
Go to the complete details ...