public void AddLog(string sSectionName, string sDescription) { try { OSMLogsContext logs = new OSMLogsContext(); OSMLogs item = new OSMLogs() { Description = sDescription, SectionName = sSectionName, When = DateTime.Now, ID = Guid.NewGuid().ToString() }; logs.LogsItem.Add(item); logs.SaveChanges(); } catch { } }