private void WriteInternal(BaseLogEntity entity) { using (LogReceiverServiceClient service = new LogReceiverServiceClient()) { service.StoreToDataBase(entity); } }
public void StoreToDataBase(BaseLogEntity entity) { if (entity is ErrorLog) SaveExceptionLogEntity((ErrorLog)entity); else if (entity is DebugLog) SaveDebugLogEntity((DebugLog)entity); else throw new NotSupportedException(entity.ToString()); }