public static ExceptionInformationEntity ToBllExceptionInformation(this DalExceptionInformation dalExceptionInformation) { return(dalExceptionInformation == null ? null : new ExceptionInformationEntity { Id = dalExceptionInformation.Id, ExceptionMessage = dalExceptionInformation.ExceptionMessage, StackTrace = dalExceptionInformation.StackTrace, ActionName = dalExceptionInformation.ActionName, ControllerName = dalExceptionInformation.ControllerName, Date = dalExceptionInformation.Date }); }
public static ExceptionInformation ToOrmExceptionInformation(this DalExceptionInformation dalExceptionInformation) { return(new ExceptionInformation { Id = dalExceptionInformation.Id, ExceptionMessage = dalExceptionInformation.ExceptionMessage, StackTrace = dalExceptionInformation.StackTrace, ActionName = dalExceptionInformation.ActionName, ControllerName = dalExceptionInformation.ControllerName, Date = dalExceptionInformation.Date }); }
public void Update(DalExceptionInformation entity) { _context.Set <ExceptionInformation>().AddOrUpdate(entity.ToOrmExceptionInformation()); }
public void Delete(DalExceptionInformation entity) { var exeption = _context.Set <ExceptionInformation>().Single(e => e.Id == entity.Id); _context.Set <ExceptionInformation>().Remove(entity.ToOrmExceptionInformation()); }