public void AddIsolationSession() { try { IIsolationSession isolationSessoin = new IsolationSession() { LeakIsolationId = Guid.NewGuid(), LeakDetailsId = Guid.Parse("3AED254F-9ADC-4BE4-BFCD-659966C588A1"), IsIsolationVerifed = "n", IsolationVerifiedDate = DateTime.Now, ReasonIsolationNotVerified = "PWP Process" }; ltr.Create((IsolationSession)isolationSessoin); } catch (Exception ex) { throw ex; } }
public void UpdateIsolationSession() { try { IIsolationSession isolationSessoin = new IsolationSession() { LeakIsolationId = Guid.Parse("8EE69FBD-89B4-44D8-8B4A-AAA0C2B04797"), LeakDetailsId = Guid.Parse("3AED254F-9ADC-4BE4-BFCD-659966C588A1"), IsIsolationVerifed = "n", IsolationVerifiedDate = DateTime.Now, ReasonIsolationNotVerified = "PWP Process" }; ltr.Update((IsolationSession)isolationSessoin); } catch (Exception ex) { throw ex; } }
// PUT: api/IsolationSession/5 public HttpResponseMessage Put(IsolationSession isolationSession) { try { response.StatusCode = HttpStatusCode.Created; response.Content = new StringContent(isolationSessionFactory.Update(isolationSession).ToString()); response.Headers.CacheControl = new CacheControlHeaderValue() { MaxAge = TimeSpan.FromMinutes(20) }; } catch (Exception ex) { response.StatusCode = HttpStatusCode.BadRequest; response.Content = new StringContent(ex.Message); response.Headers.CacheControl = new CacheControlHeaderValue() { MaxAge = TimeSpan.FromMinutes(20) }; } return(response); }