public static ExceptionLogObject UpdateAccordingWith(this ExceptionLogObject exceptionLogObject, ExceptionLog exceptionLog) { exceptionLogObject.Message = exceptionLog.Message; exceptionLogObject.ExceptionDetails = exceptionLog.ExceptionDetails; exceptionLogObject.UserName = exceptionLog.UserName; exceptionLogObject.IPAddress = exceptionLog.IPAddress; exceptionLogObject.UserAgent = exceptionLog.UserAgent; exceptionLogObject.HttpReferrer = exceptionLog.HttpReferrer; exceptionLogObject.HttpVerb = exceptionLog.HttpVerb; exceptionLogObject.PathAndQuery = exceptionLog.PathAndQuery; exceptionLogObject.DateCreated = exceptionLog.DateCreated; exceptionLogObject.DateLastOccurred = exceptionLog.DateLastOccurred; exceptionLogObject.Frequency = exceptionLog.Frequency; return(exceptionLogObject); }
public static ExceptionLog ToExceptionLog(this ExceptionLogObject exceptionLogObject) { return(new ExceptionLog(exceptionLogObject.Id) { Message = exceptionLogObject.Message, ExceptionDetails = exceptionLogObject.ExceptionDetails, UserName = exceptionLogObject.UserName, IPAddress = exceptionLogObject.IPAddress, UserAgent = exceptionLogObject.UserAgent, HttpReferrer = exceptionLogObject.HttpReferrer, HttpVerb = exceptionLogObject.HttpVerb, PathAndQuery = exceptionLogObject.PathAndQuery, DateCreated = exceptionLogObject.DateCreated, DateLastOccurred = exceptionLogObject.DateLastOccurred, Frequency = exceptionLogObject.Frequency }); }