├── Reading ├── .vs │ └── Reading │ │ └── v15 │ │ ├── Server │ │ └── sqlite3 │ │ │ ├── db.lock │ │ │ └── storage.ide │ │ └── .suo ├── Reading.Bll │ ├── obj │ │ └── Debug │ │ │ ├── Reading.Bll.csproj.CopyComplete │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ ├── ArticleBll.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Reading.Bll.csproj ├── Reading.Dal │ ├── obj │ │ └── Debug │ │ │ ├── Reading.Dal.csproj.CopyComplete │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ ├── packages.config │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Reading.Dal.csproj │ └── ArticleDal.cs ├── Reading.Job │ ├── obj │ │ └── Debug │ │ │ ├── Reading.Job.csproj.CopyComplete │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ ├── packages.config │ ├── App.config │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Program.cs │ └── Reading.Job.csproj ├── Reading.Web │ ├── obj │ │ └── Debug │ │ │ ├── Reading.Web.csproj.CopyComplete │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Random │ │ │ └── Index.cshtml │ │ ├── web.config │ │ └── Shared │ │ │ └── _Layout.cshtml │ ├── favicon.ico │ ├── bin │ │ └── roslyn │ │ │ ├── csc.exe │ │ │ ├── csi.exe │ │ │ ├── vbc.exe │ │ │ ├── System.Console.dll │ │ │ ├── VBCSCompiler.exe │ │ │ ├── System.IO.Pipes.dll │ │ │ ├── System.Xml.XPath.dll │ │ │ ├── System.AppContext.dll │ │ │ ├── System.ValueTuple.dll │ │ │ ├── System.IO.Compression.dll │ │ │ ├── System.IO.FileSystem.dll │ │ │ ├── Microsoft.CodeAnalysis.dll │ │ │ ├── System.Security.Claims.dll │ │ │ ├── System.Threading.Thread.dll │ │ │ ├── System.Xml.ReaderWriter.dll │ │ │ ├── System.Xml.XmlDocument.dll │ │ │ ├── Microsoft.Win32.Primitives.dll │ │ │ ├── System.Diagnostics.Process.dll │ │ │ ├── System.Reflection.Metadata.dll │ │ │ ├── System.Xml.XPath.XDocument.dll │ │ │ ├── Microsoft.CodeAnalysis.CSharp.dll │ │ │ ├── System.Collections.Immutable.dll │ │ │ ├── System.Diagnostics.StackTrace.dll │ │ │ ├── System.Security.AccessControl.dll │ │ │ ├── System.IO.FileSystem.DriveInfo.dll │ │ │ ├── System.IO.FileSystem.Primitives.dll │ │ │ ├── System.Text.Encoding.CodePages.dll │ │ │ ├── Microsoft.Build.Tasks.CodeAnalysis.dll │ │ │ ├── Microsoft.CodeAnalysis.Scripting.dll │ │ │ ├── Microsoft.CodeAnalysis.VisualBasic.dll │ │ │ ├── Microsoft.DiaSymReader.Native.x86.dll │ │ │ ├── System.Diagnostics.FileVersionInfo.dll │ │ │ ├── System.Security.Principal.Windows.dll │ │ │ ├── Microsoft.DiaSymReader.Native.amd64.dll │ │ │ ├── Microsoft.CodeAnalysis.CSharp.Scripting.dll │ │ │ ├── System.Security.Cryptography.Algorithms.dll │ │ │ ├── System.Security.Cryptography.Encoding.dll │ │ │ ├── System.Security.Cryptography.Primitives.dll │ │ │ ├── System.Security.Cryptography.X509Certificates.dll │ │ │ ├── csi.rsp │ │ │ ├── csc.rsp │ │ │ ├── vbc.rsp │ │ │ ├── Microsoft.VisualBasic.Core.targets │ │ │ ├── Microsoft.CSharp.Core.targets │ │ │ ├── csc.exe.config │ │ │ ├── vbc.exe.config │ │ │ └── csi.exe.config │ ├── Global.asax │ ├── Global.asax.cs │ ├── App_Start │ │ └── RouteConfig.cs │ ├── Controllers │ │ ├── HomeController.cs │ │ └── RandomController.cs │ ├── packages.config │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Reading.Web.csproj.user │ ├── Web.config │ └── style │ │ └── main.css ├── Reading.Factory │ ├── obj │ │ └── Debug │ │ │ ├── Reading.Factory.csproj.CopyComplete │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ ├── packages.config │ ├── ConnectionFactory.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Reading.Factory.csproj ├── Reading.Model │ ├── obj │ │ └── Debug │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ ├── Articles.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── Reading.Model.csproj ├── Reading.Utility │ ├── obj │ │ └── Debug │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Reading.Utility.csproj │ └── HttpHelper.cs └── Reading.sln ├── iReading ├── iReading.API │ ├── obj │ │ ├── Debug │ │ │ └── netcoreapp2.0 │ │ │ │ └── iReading.API.csproj.CopyComplete │ │ ├── iReading.API.csproj.nuget.g.props │ │ └── iReading.API.csproj.nuget.g.targets │ ├── appsettings.Development.json │ ├── Models │ │ └── ArticleViewModel.cs │ ├── iReading.API.csproj.user │ ├── appsettings.json │ ├── Program.cs │ ├── iReading.API.csproj │ ├── Properties │ │ └── launchSettings.json │ ├── Startup.cs │ └── Controllers │ │ └── ArticleController.cs ├── iReading.BLL │ ├── obj │ │ ├── Debug │ │ │ └── netcoreapp2.0 │ │ │ │ └── iReading.BLL.csproj.CopyComplete │ │ ├── Release │ │ │ └── netcoreapp2.0 │ │ │ │ └── iReading.BLL.csproj.CopyComplete │ │ ├── iReading.BLL.csproj.nuget.g.targets │ │ └── iReading.BLL.csproj.nuget.g.props │ └── iReading.BLL.csproj ├── iReading.DAL │ ├── obj │ │ ├── Debug │ │ │ └── netcoreapp2.0 │ │ │ │ └── iReading.DAL.csproj.CopyComplete │ │ ├── Release │ │ │ └── netcoreapp2.0 │ │ │ │ └── iReading.DAL.csproj.CopyComplete │ │ ├── iReading.DAL.csproj.nuget.g.targets │ │ └── iReading.DAL.csproj.nuget.g.props │ ├── Migrations │ │ ├── ArticleData.sql │ │ ├── ArticleDbContextModelSnapshot.cs │ │ ├── 20170918090820_Init.Designer.cs │ │ └── 20170918090820_Init.cs │ ├── iReading.DAL.csproj.user │ ├── iReading.DAL.csproj │ └── ArticleDbContext.cs ├── iReading.Job │ ├── obj │ │ ├── Debug │ │ │ └── netcoreapp2.0 │ │ │ │ └── iReading.Job.csproj.CopyComplete │ │ ├── iReading.Job.csproj.nuget.g.targets │ │ └── iReading.Job.csproj.nuget.g.props │ ├── iReading.Job.csproj.user │ ├── Properties │ │ └── PublishProfiles │ │ │ ├── FolderProfile.pubxml.user │ │ │ └── FolderProfile.pubxml │ ├── iReading.Job.csproj │ └── Program.cs ├── iReading.Web │ ├── obj │ │ ├── Debug │ │ │ └── netcoreapp2.0 │ │ │ │ └── iReading.Web.csproj.CopyComplete │ │ ├── iReading.Web.csproj.nuget.g.props │ │ └── iReading.Web.csproj.nuget.g.targets │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Home │ │ │ └── Index.cshtml │ │ ├── Random │ │ │ └── Index.cshtml │ │ └── Shared │ │ │ └── _Layout.cshtml │ ├── wwwroot │ │ ├── favicon.ico │ │ └── style │ │ │ └── main.css │ ├── web.config │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── Models │ │ └── ArticleViewModel.cs │ ├── Program.cs │ ├── Properties │ │ ├── PublishProfiles │ │ │ ├── CustomProfile.pubxml.user │ │ │ └── CustomProfile.pubxml │ │ └── launchSettings.json │ ├── iReading.Web.csproj │ ├── bundleconfig.json │ ├── Controllers │ │ ├── HomeController.cs │ │ └── RandomController.cs │ ├── iReading.Web.csproj.user │ └── Startup.cs ├── .vs │ ├── slnx.sqlite │ ├── iReading │ │ └── v15 │ │ │ ├── .suo │ │ │ └── sqlite3 │ │ │ └── storage.ide │ └── VSWorkspaceState.json ├── iReading.Utility │ ├── obj │ │ ├── Release │ │ │ └── netcoreapp2.0 │ │ │ │ ├── iReading.Utility.AssemblyInfoInputs.cache │ │ │ │ ├── iReading.Utility.csproj.CoreCompileInputs.cache │ │ │ │ └── iReading.Utility.AssemblyInfo.cs │ │ ├── iReading.Utility.csproj.nuget.g.targets │ │ └── iReading.Utility.csproj.nuget.g.props │ ├── iReading.Utility.csproj │ └── HttpHelper.cs ├── iReading.UnitTest │ ├── obj │ │ ├── Release │ │ │ └── netcoreapp2.0 │ │ │ │ ├── iReading.UnitTest.AssemblyInfoInputs.cache │ │ │ │ ├── iReading.UnitTest.csproj.CoreCompileInputs.cache │ │ │ │ ├── iReading.UnitTest.Program.cs │ │ │ │ └── iReading.UnitTest.AssemblyInfo.cs │ │ ├── Debug │ │ │ └── netcoreapp2.0 │ │ │ │ └── iReading.UnitTest.Program.cs │ │ ├── iReading.UnitTest.csproj.nuget.g.targets │ │ └── iReading.UnitTest.csproj.nuget.g.props │ └── iReading.UnitTest.csproj ├── iReading.Entity │ ├── iReading.Entity.csproj │ ├── obj │ │ ├── iReading.Entity.csproj.nuget.g.targets │ │ └── iReading.Entity.csproj.nuget.g.props │ ├── ArticleViews.cs │ └── Articles.cs └── iReading.sln └── README.md /Reading/.vs/Reading/v15/Server/sqlite3/db.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Bll/obj/Debug/Reading.Bll.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Dal/obj/Debug/Reading.Dal.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Job/obj/Debug/Reading.Job.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Web/obj/Debug/Reading.Web.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Factory/obj/Debug/Reading.Factory.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iReading/iReading.API/obj/Debug/netcoreapp2.0/iReading.API.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iReading/iReading.BLL/obj/Debug/netcoreapp2.0/iReading.BLL.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iReading/iReading.DAL/obj/Debug/netcoreapp2.0/iReading.DAL.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iReading/iReading.Job/obj/Debug/netcoreapp2.0/iReading.Job.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iReading/iReading.Web/obj/Debug/netcoreapp2.0/iReading.Web.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iReading/iReading.BLL/obj/Release/netcoreapp2.0/iReading.BLL.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iReading/iReading.DAL/obj/Release/netcoreapp2.0/iReading.DAL.csproj.CopyComplete: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iReading/iReading.Web/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /Reading/Reading.Bll/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Bll/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Bll/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Dal/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Dal/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Dal/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Job/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Job/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Job/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Web/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Web/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Web/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Factory/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Factory/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Factory/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Model/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Model/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Model/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Utility/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Utility/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Reading/Reading.Utility/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /iReading/.vs/slnx.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/iReading/.vs/slnx.sqlite -------------------------------------------------------------------------------- /Reading/Reading.Web/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /Reading/.vs/Reading/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/.vs/Reading/v15/.suo -------------------------------------------------------------------------------- /Reading/Reading.Web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/favicon.ico -------------------------------------------------------------------------------- /iReading/.vs/iReading/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/iReading/.vs/iReading/v15/.suo -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/csc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/csc.exe -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/csi.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/csi.exe -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/vbc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/vbc.exe -------------------------------------------------------------------------------- /iReading/.vs/VSWorkspaceState.json: -------------------------------------------------------------------------------- 1 | { 2 | "ExpandedNodes": [ 3 | "" 4 | ], 5 | "PreviewInSolutionExplorer": false 6 | } -------------------------------------------------------------------------------- /iReading/iReading.Web/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using iReading.Web.Models 2 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -------------------------------------------------------------------------------- /iReading/iReading.Web/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/iReading/iReading.Web/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Reading/Reading.Web/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Reading.Web.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /iReading/iReading.Utility/obj/Release/netcoreapp2.0/iReading.Utility.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 46c3bd9889813534ee051249c2cca488faede160 2 | -------------------------------------------------------------------------------- /iReading/.vs/iReading/v15/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/iReading/.vs/iReading/v15/sqlite3/storage.ide -------------------------------------------------------------------------------- /iReading/iReading.UnitTest/obj/Release/netcoreapp2.0/iReading.UnitTest.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | d43978c5210c2ce85fbac7870f1014c19cd99fd4 2 | -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Console.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Console.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/VBCSCompiler.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/VBCSCompiler.exe -------------------------------------------------------------------------------- /iReading/iReading.DAL/Migrations/ArticleData.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/iReading/iReading.DAL/Migrations/ArticleData.sql -------------------------------------------------------------------------------- /iReading/iReading.UnitTest/obj/Release/netcoreapp2.0/iReading.UnitTest.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | e20d178a16a5f641fb8427f42371ffdae3b8a843 2 | -------------------------------------------------------------------------------- /iReading/iReading.Utility/obj/Release/netcoreapp2.0/iReading.Utility.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | fcf18e37b4b9d6289c84d3835474fd58fadb4587 2 | -------------------------------------------------------------------------------- /Reading/.vs/Reading/v15/Server/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/.vs/Reading/v15/Server/sqlite3/storage.ide -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.IO.Pipes.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.IO.Pipes.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Xml.XPath.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Xml.XPath.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 【Coding】iReading 2 | 基于Asp.net Core2.0开发的阅读类小Web项目,练手、学习使用Asp.net Core。 3 | 4 | # 【Done】Reading 5 | 基于ASP.NET MVC + Dapper + Mysql simple demo -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.AppContext.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.AppContext.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.ValueTuple.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.ValueTuple.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.IO.Compression.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.IO.Compression.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.IO.FileSystem.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.IO.FileSystem.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.CodeAnalysis.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/Microsoft.CodeAnalysis.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Security.Claims.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Security.Claims.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Threading.Thread.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Threading.Thread.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Xml.ReaderWriter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Xml.ReaderWriter.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Xml.XmlDocument.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Xml.XmlDocument.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.Win32.Primitives.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/Microsoft.Win32.Primitives.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Diagnostics.Process.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Diagnostics.Process.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Reflection.Metadata.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Reflection.Metadata.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Xml.XPath.XDocument.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Xml.XPath.XDocument.dll -------------------------------------------------------------------------------- /Reading/Reading.Dal/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.CodeAnalysis.CSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/Microsoft.CodeAnalysis.CSharp.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Collections.Immutable.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Collections.Immutable.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Diagnostics.StackTrace.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Diagnostics.StackTrace.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Security.AccessControl.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Security.AccessControl.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.IO.FileSystem.DriveInfo.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.IO.FileSystem.DriveInfo.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.IO.FileSystem.Primitives.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.IO.FileSystem.Primitives.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Text.Encoding.CodePages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Text.Encoding.CodePages.dll -------------------------------------------------------------------------------- /Reading/Reading.Factory/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Reading/Reading.Job/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.Build.Tasks.CodeAnalysis.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/Microsoft.Build.Tasks.CodeAnalysis.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.CodeAnalysis.Scripting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/Microsoft.CodeAnalysis.Scripting.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.CodeAnalysis.VisualBasic.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/Microsoft.CodeAnalysis.VisualBasic.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.DiaSymReader.Native.x86.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/Microsoft.DiaSymReader.Native.x86.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Diagnostics.FileVersionInfo.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Diagnostics.FileVersionInfo.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Security.Principal.Windows.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Security.Principal.Windows.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.DiaSymReader.Native.amd64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/Microsoft.DiaSymReader.Native.amd64.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.CodeAnalysis.CSharp.Scripting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/Microsoft.CodeAnalysis.CSharp.Scripting.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Security.Cryptography.Algorithms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Security.Cryptography.Algorithms.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Security.Cryptography.Encoding.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Security.Cryptography.Encoding.dll -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Security.Cryptography.Primitives.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Security.Cryptography.Primitives.dll -------------------------------------------------------------------------------- /Reading/Reading.Bll/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Bll/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Reading/Reading.Dal/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Dal/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Reading/Reading.Job/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Job/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Reading/Reading.Web/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Reading/Reading.Model/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Model/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /iReading/iReading.UnitTest/obj/Debug/netcoreapp2.0/iReading.UnitTest.Program.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/iReading/iReading.UnitTest/obj/Debug/netcoreapp2.0/iReading.UnitTest.Program.cs -------------------------------------------------------------------------------- /Reading/Reading.Factory/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Factory/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Reading/Reading.Utility/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Utility/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/System.Security.Cryptography.X509Certificates.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/Reading/Reading.Web/bin/roslyn/System.Security.Cryptography.X509Certificates.dll -------------------------------------------------------------------------------- /iReading/iReading.Entity/iReading.Entity.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iReading/iReading.UnitTest/obj/Release/netcoreapp2.0/iReading.UnitTest.Program.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meowv/iReading/HEAD/iReading/iReading.UnitTest/obj/Release/netcoreapp2.0/iReading.UnitTest.Program.cs -------------------------------------------------------------------------------- /iReading/iReading.Utility/iReading.Utility.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iReading/iReading.Web/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /iReading/iReading.API/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /iReading/iReading.Web/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /iReading/iReading.DAL/iReading.DAL.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | -------------------------------------------------------------------------------- /iReading/iReading.API/Models/ArticleViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace iReading.API.Models 2 | { 3 | public class ArticleViewModel 4 | { 5 | public string Title { get; set; } 6 | public string Author { get; set; } 7 | public string Content { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /iReading/iReading.Web/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Warning" 6 | } 7 | }, 8 | "ConnectionStrings": { 9 | "SqlServerConnection": "Server=.;Database=Reading;User ID=sa;Password=123456;" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /iReading/iReading.API/iReading.API.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 600 5 | 6 | -------------------------------------------------------------------------------- /iReading/iReading.BLL/iReading.BLL.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Reading/Reading.Web/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Routing; 2 | 3 | namespace Reading.Web 4 | { 5 | public class MvcApplication : System.Web.HttpApplication 6 | { 7 | protected void Application_Start() 8 | { 9 | RouteConfig.RegisterRoutes(RouteTable.Routes); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/csi.rsp: -------------------------------------------------------------------------------- 1 | /r:System 2 | /r:System.Core 3 | /r:Microsoft.CSharp 4 | /r:System.ValueTuple.dll 5 | /u:System 6 | /u:System.IO 7 | /u:System.Collections.Generic 8 | /u:System.Console 9 | /u:System.Diagnostics 10 | /u:System.Dynamic 11 | /u:System.Linq 12 | /u:System.Linq.Expressions 13 | /u:System.Text 14 | /u:System.Threading.Tasks -------------------------------------------------------------------------------- /iReading/iReading.Job/iReading.Job.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <_LastSelectedProfileId>F:\------------------------------------------------\iReading\iReading.Job\Properties\PublishProfiles\FolderProfile.pubxml 5 | 6 | -------------------------------------------------------------------------------- /iReading/iReading.Web/Models/ArticleViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace iReading.Web.Models 7 | { 8 | public class ArticleViewModel 9 | { 10 | public string Title { get; set; } 11 | public string Author { get; set; } 12 | public string Content { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /iReading/iReading.API/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "SqlServerConnection": "Server=.;Database=Reading;User ID=sa;Password=123456;" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "Debug": { 8 | "LogLevel": { 9 | "Default": "Warning" 10 | } 11 | }, 12 | "Console": { 13 | "LogLevel": { 14 | "Default": "Warning" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /iReading/iReading.Job/Properties/PublishProfiles/FolderProfile.pubxml.user: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /Reading/Reading.Model/Articles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Reading.Model 4 | { 5 | public class Articles 6 | { 7 | public string Id { get; set; } 8 | public string Author { get; set; } 9 | public string Title { get; set; } 10 | public string Digest { get; set; } 11 | public string Content { get; set; } 12 | public string Words { get; set; } 13 | public DateTime CreateTime { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /iReading/iReading.API/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace iReading.API 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /iReading/iReading.Web/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace iReading.Web 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /iReading/iReading.UnitTest/iReading.UnitTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | false 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /iReading/iReading.Job/iReading.Job.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /iReading/iReading.Web/Properties/PublishProfiles/CustomProfile.pubxml.user: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | <_PublishTargetUrl>F:\------------------------------------------------\iReadingPub 10 | 11 | -------------------------------------------------------------------------------- /iReading/iReading.DAL/iReading.DAL.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /iReading/iReading.Web/iReading.Web.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netcoreapp2.0 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Reading/Reading.Web/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model Reading.Model.Articles 2 | @{ 3 | ViewBag.Title = "iReading"; 4 | } 5 |
6 |
7 |
8 |
9 |

@Model.Title

10 |

@Model.Author

11 |
12 | @Html.Raw(Model.Content) 13 |
14 |
15 |
16 |
17 |
18 |
-------------------------------------------------------------------------------- /iReading/iReading.Web/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model ArticleViewModel 2 | @{ 3 | ViewData["Title"] = "iReading"; 4 | } 5 |
6 |
7 |
8 |
9 |

@Model.Title

10 |

@Model.Author

11 |
12 | @Html.Raw(Model.Content) 13 |
14 |
15 |
16 |
17 |
18 |
-------------------------------------------------------------------------------- /Reading/Reading.Web/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace Reading.Web 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Reading/Reading.Web/Views/Random/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model Reading.Model.Articles 2 | @{ 3 | ViewBag.Title = "iReading"; 4 | } 5 |
6 |
7 |
8 |
9 |

@Model.Title

10 |

@Model.Author

11 |
12 | @Html.Raw(Model.Content) 13 |
14 |
15 |
16 |
17 |
18 |
-------------------------------------------------------------------------------- /iReading/iReading.Web/Views/Random/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model ArticleViewModel 2 | @{ 3 | ViewData["Title"] = "iReading"; 4 | } 5 |
6 |
7 |
8 |
9 |

@Model.Title

10 |

@Model.Author

11 |
12 | @Html.Raw(Model.Content) 13 |
14 |
15 |
16 |
17 |
18 |
-------------------------------------------------------------------------------- /iReading/iReading.Job/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | FileSystem 9 | Release 10 | netcoreapp2.0 11 | bin\Release\PublishOutput 12 | 13 | -------------------------------------------------------------------------------- /Reading/Reading.Bll/ArticleBll.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Reading.Dal; 3 | using Reading.Model; 4 | 5 | namespace Reading.Bll 6 | { 7 | public class ArticleBll 8 | { 9 | private readonly ArticleDal _dal = new ArticleDal(); 10 | 11 | public int InsertArticle(Articles articles) => _dal.InsertArticle(articles); 12 | 13 | public bool IsExistArticle(string author, string title) => _dal.IsExistArticle(author, title) >= 1; 14 | 15 | public IEnumerable Get_Articles_List() => _dal.Get_Articles_List(); 16 | 17 | public Articles Get_New_Article() => _dal.Get_New_Article(); 18 | 19 | public Articles Get_Random_Article() => _dal.Get_Random_Article(); 20 | } 21 | } -------------------------------------------------------------------------------- /iReading/iReading.Web/bundleconfig.json: -------------------------------------------------------------------------------- 1 | // Configure bundling and minification for the project. 2 | // More info at https://go.microsoft.com/fwlink/?LinkId=808241 3 | [ 4 | { 5 | "outputFileName": "wwwroot/style/main.min.css", 6 | // An array of relative input file paths. Globbing patterns supported 7 | "inputFiles": [ 8 | "wwwroot/style/main.css" 9 | ] 10 | }, 11 | { 12 | "outputFileName": "wwwroot/js/main.min.js", 13 | "inputFiles": [ 14 | "wwwroot/js/main.js" 15 | ], 16 | // Optionally specify minification options 17 | "minify": { 18 | "enabled": true, 19 | "renameLocals": true 20 | }, 21 | // Optionally generate .map file 22 | "sourceMap": false 23 | } 24 | ] 25 | -------------------------------------------------------------------------------- /Reading/Reading.Web/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Reading.Bll; 2 | using System.Web.Mvc; 3 | 4 | namespace Reading.Web.Controllers 5 | { 6 | public class HomeController : Controller 7 | { 8 | private readonly ArticleBll _bll = new ArticleBll(); 9 | 10 | public ActionResult Index() 11 | { 12 | //var article = _bll.Get_Articles_List() 13 | // .Select(a => new Articles 14 | // { 15 | // Title = a.Title, 16 | // Author = a.Author, 17 | // Content = a.Content 18 | // }).LastOrDefault(); 19 | 20 | var article = _bll.Get_New_Article(); 21 | 22 | return View(article); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /iReading/iReading.Web/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:58420/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "iReading.Web": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | }, 24 | "applicationUrl": "http://localhost:58421/" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /iReading/iReading.API/iReading.API.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Reading/Reading.Web/Controllers/RandomController.cs: -------------------------------------------------------------------------------- 1 | using Reading.Bll; 2 | using System.Web.Mvc; 3 | 4 | namespace Reading.Web.Controllers 5 | { 6 | public class RandomController : Controller 7 | { 8 | private readonly ArticleBll _bll = new ArticleBll(); 9 | 10 | public ActionResult Index() 11 | { 12 | //var article = _bll.Get_Articles_List() 13 | // .OrderBy(a => Guid.NewGuid()) 14 | // .Select(a => new Articles 15 | // { 16 | // Title = a.Title, 17 | // Author = a.Author, 18 | // Content = a.Content 19 | // }).LastOrDefault(); 20 | 21 | var article = _bll.Get_Random_Article(); 22 | 23 | return View(article); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /iReading/iReading.DAL/ArticleDbContext.cs: -------------------------------------------------------------------------------- 1 | using iReading.Entity; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace iReading.DAL 5 | { 6 | public class ArticleDbContext : DbContext 7 | { 8 | public ArticleDbContext(DbContextOptions options) : base(options) { } 9 | 10 | private string _connection; 11 | public ArticleDbContext(string connection) 12 | { 13 | _connection = connection; 14 | } 15 | 16 | protected override void OnConfiguring(DbContextOptionsBuilder builder) 17 | { 18 | if (!string.IsNullOrEmpty(_connection)) 19 | builder.UseSqlServer(_connection); 20 | } 21 | 22 | public DbSet Articles { get; set; } 23 | public DbSet ArticleViews { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /iReading/iReading.API/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:58422/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "launchUrl": "api/article", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "iReading.API": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "launchUrl": "api/article", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | }, 26 | "applicationUrl": "http://localhost:58423/" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /iReading/iReading.Web/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using iReading.DAL; 2 | using iReading.Web.Models; 3 | using Microsoft.AspNetCore.Mvc; 4 | using System.Linq; 5 | 6 | namespace iReading.Web.Controllers 7 | { 8 | public class HomeController : Controller 9 | { 10 | private readonly ArticleDbContext _db; 11 | 12 | public HomeController(ArticleDbContext db) 13 | { 14 | _db = db; 15 | } 16 | 17 | public IActionResult Index() 18 | { 19 | var article = _db.Articles 20 | .Where(t => t.Status == 0 && t.IsDelete == 0) 21 | .Select(t => new ArticleViewModel 22 | { 23 | Title = t.Title, 24 | Author = t.Author, 25 | Content = t.Details 26 | }) 27 | .LastOrDefault(); 28 | 29 | return View(article); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Reading/Reading.Web/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Reading/Reading.Job/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /iReading/iReading.Web/Properties/PublishProfiles/CustomProfile.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | FileSystem 9 | Release 10 | Any CPU 11 | 12 | True 13 | False 14 | netcoreapp2.0 15 | 6199a691-2cd7-486d-936d-91f590508dfc 16 | F:\------------------------------------------------\iReadingPub 17 | False 18 | 19 | -------------------------------------------------------------------------------- /iReading/iReading.Web/Controllers/RandomController.cs: -------------------------------------------------------------------------------- 1 | using iReading.DAL; 2 | using iReading.Web.Models; 3 | using Microsoft.AspNetCore.Mvc; 4 | using System; 5 | using System.Linq; 6 | 7 | namespace iReading.Web.Controllers 8 | { 9 | public class RandomController : Controller 10 | { 11 | private readonly ArticleDbContext _db; 12 | 13 | public RandomController(ArticleDbContext db) 14 | { 15 | _db = db; 16 | } 17 | 18 | public IActionResult Index() 19 | { 20 | var article = _db.Articles 21 | .Where(t => t.Status == 0 && t.IsDelete == 0) 22 | .OrderBy(t => Guid.NewGuid()) 23 | .Select(t => new ArticleViewModel 24 | { 25 | Title = t.Title, 26 | Author = t.Author, 27 | Content = t.Details 28 | }) 29 | .LastOrDefault(); 30 | 31 | return View(article); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /iReading/iReading.BLL/obj/iReading.BLL.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /iReading/iReading.DAL/obj/iReading.DAL.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /iReading/iReading.Job/obj/iReading.Job.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /iReading/iReading.Entity/obj/iReading.Entity.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /iReading/iReading.Utility/obj/iReading.Utility.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Reading/Reading.Factory/ConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | using MySql.Data.MySqlClient; 2 | using System.Configuration; 3 | using System.Data; 4 | using System.Data.SqlClient; 5 | 6 | namespace Reading.Factory 7 | { 8 | public class ConnectionFactory 9 | { 10 | private static readonly string ConnectionName = ConfigurationManager.AppSettings["ConnectionName"]; 11 | 12 | private static readonly string MysqlConnectionString = 13 | ConfigurationManager.ConnectionStrings["mysqlConnectionString_Article"].ConnectionString; 14 | 15 | public static IDbConnection CreateConnection() 16 | { 17 | IDbConnection conn; 18 | switch (ConnectionName) 19 | { 20 | case "MySQL": 21 | conn = new MySqlConnection(MysqlConnectionString); 22 | break; 23 | default: 24 | conn = new SqlConnection(MysqlConnectionString); 25 | break; 26 | } 27 | conn.Open(); 28 | return conn; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /iReading/iReading.Entity/ArticleViews.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace iReading.Entity 5 | { 6 | public class ArticleViews 7 | { 8 | /// 9 | /// 文章主键 10 | /// 11 | [Key] 12 | public int ArticleId { get; set; } 13 | 14 | /// 15 | /// 真实点击量 16 | /// 17 | public int Hits { get; set; } 18 | 19 | /// 20 | /// 用于展示的点击量 21 | /// 22 | public int ShowHits { get; set; } 23 | 24 | /// 25 | /// 用户IP 26 | /// 27 | public string UserIp { get; set; } 28 | 29 | /// 30 | /// 来源城市 31 | /// 32 | public string City { get; set; } 33 | 34 | /// 35 | /// 用户代理 36 | /// 37 | public int UserAgent { get; set; } 38 | 39 | /// 40 | /// 浏览时间 41 | /// 42 | public DateTime ViewTime { get; set; } 43 | } 44 | } -------------------------------------------------------------------------------- /Reading/Reading.Web/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过下列特性集 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Reading.Web")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Reading.Web")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要 19 | // 从 COM 访问此程序集中的某个类型,请针对该类型将 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID 23 | [assembly: Guid("8a221a19-e7c9-4acb-8f7d-93fb7b250b82")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 内部版本号 30 | // 修订版本 31 | // 32 | // 可以指定所有值,也可以使用“修订号”和“内部版本号”的默认值, 33 | // 方法是按如下所示使用 "*": 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /iReading/iReading.Utility/obj/Release/netcoreapp2.0/iReading.Utility.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("iReading.Utility")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] 16 | [assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("iReading.Utility")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("iReading.Utility")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 22 | 23 | // 由 MSBuild WriteCodeFragment 类生成。 24 | 25 | -------------------------------------------------------------------------------- /Reading/Reading.Bll/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Reading.Bll")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Reading.Bll")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("c7472c2c-3eac-453d-aed9-99d199cd6164")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Reading/Reading.Dal/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Reading.Dal")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Reading.Dal")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("f9cac210-74fc-4a1b-ab53-8f5eaa929f59")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Reading/Reading.Job/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Reading.Job")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Reading.Job")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("ef83ef29-04e1-4d63-a373-2fdb5a3282a5")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | // 方法是按如下所示使用“*”: : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /iReading/iReading.UnitTest/obj/Release/netcoreapp2.0/iReading.UnitTest.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("iReading.UnitTest")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] 16 | [assembly: System.Reflection.AssemblyDescriptionAttribute("Package Description")] 17 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 18 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 19 | [assembly: System.Reflection.AssemblyProductAttribute("iReading.UnitTest")] 20 | [assembly: System.Reflection.AssemblyTitleAttribute("iReading.UnitTest")] 21 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 22 | 23 | // 由 MSBuild WriteCodeFragment 类生成。 24 | 25 | -------------------------------------------------------------------------------- /Reading/Reading.Model/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Reading.Model")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Reading.Model")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("4358a329-97b5-4902-bc65-2837c6b59f83")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Reading/Reading.Factory/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Reading.Factory")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Reading.Factory")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("f3ee27fe-0757-4604-bfee-b89a5965c06d")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Reading/Reading.Utility/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Reading.Utility")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Reading.Utility")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("6d8f16f6-21c4-4004-93a6-b1a070ea0eec")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | //通过使用 "*",如下所示: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Reading/Reading.Web/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 30 | 31 | -------------------------------------------------------------------------------- /Reading/Reading.Web/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 31 | 32 | -------------------------------------------------------------------------------- /iReading/iReading.Web/iReading.Web.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 600 5 | 600 6 | IIS Express 7 | True 8 | False 9 | False 10 | 11 | False 12 | 600 13 | CustomProfile 14 | 15 | 16 | ProjectDebugger 17 | 18 | -------------------------------------------------------------------------------- /iReading/iReading.UnitTest/obj/iReading.UnitTest.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /iReading/iReading.API/Startup.cs: -------------------------------------------------------------------------------- 1 | using iReading.DAL; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.EntityFrameworkCore; 5 | using Microsoft.Extensions.Configuration; 6 | using Microsoft.Extensions.DependencyInjection; 7 | 8 | namespace iReading.API 9 | { 10 | public class Startup 11 | { 12 | public static string connection; 13 | 14 | public Startup(IConfiguration configuration) 15 | { 16 | Configuration = configuration; 17 | } 18 | 19 | public IConfiguration Configuration { get; } 20 | 21 | // This method gets called by the runtime. Use this method to add services to the container. 22 | public void ConfigureServices(IServiceCollection services) 23 | { 24 | services.AddMvc(); 25 | 26 | connection = Configuration.GetConnectionString("SqlServerConnection"); 27 | services.AddDbContext(options => options.UseSqlServer(connection)); 28 | } 29 | 30 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 31 | public void Configure(IApplicationBuilder app, IHostingEnvironment env) 32 | { 33 | if (env.IsDevelopment()) 34 | { 35 | app.UseDeveloperExceptionPage(); 36 | } 37 | 38 | app.UseMvc(); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /iReading/iReading.Job/Program.cs: -------------------------------------------------------------------------------- 1 | using iReading.DAL; 2 | using iReading.Entity; 3 | using iReading.Utility; 4 | using Newtonsoft.Json.Linq; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | 9 | namespace iReading.Job 10 | { 11 | class Program 12 | { 13 | static void Main(string[] args) 14 | { 15 | var url = "https://interface.meiriyiwen.com/article/random"; 16 | string json = HttpHelper.SendPost(url, new Dictionary(), "get"); 17 | JObject obj = JObject.Parse(json); 18 | 19 | using (ArticleDbContext db = new ArticleDbContext("Server=.;Database=Reading;User ID=sa;Password=123456")) 20 | { 21 | var title = (string)obj["data"]["title"]; 22 | var author = (string)obj["data"]["author"]; 23 | 24 | //表中是否存在此条数据 25 | bool exist = db.Articles.Any(a => a.Title == title && a.Author == author); 26 | if (!exist) 27 | { 28 | db.Articles.Add(new Articles() 29 | { 30 | Title = title, 31 | Author = author, 32 | Details = (string)obj["data"]["content"], 33 | Summary = (string)obj["data"]["digest"], 34 | Category = "阅读", 35 | IssueTime = DateTime.Now, 36 | UpdateTime = DateTime.Now 37 | }); 38 | db.SaveChanges(); 39 | } 40 | } 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /iReading/iReading.API/Controllers/ArticleController.cs: -------------------------------------------------------------------------------- 1 | using iReading.API.Models; 2 | using iReading.DAL; 3 | using Microsoft.AspNetCore.Mvc; 4 | using System; 5 | using System.Linq; 6 | 7 | namespace iReading.API.Controllers 8 | { 9 | [Route("api")] 10 | public class ArticleController : Controller 11 | { 12 | private readonly ArticleDbContext _db; 13 | public ArticleController(ArticleDbContext db) 14 | { 15 | _db = db; 16 | } 17 | 18 | [HttpGet,Route("article")] 19 | public ArticleViewModel GetArticle() 20 | { 21 | //return new string[] { "value1", "value2" }; 22 | var article = _db.Articles 23 | .Where(t => t.Status == 0 && t.IsDelete == 0) 24 | .Select(t => new ArticleViewModel 25 | { 26 | Title = t.Title, 27 | Author = t.Author, 28 | Content = t.Details 29 | }).LastOrDefault(); 30 | return article; 31 | } 32 | 33 | [HttpGet,Route("random")] 34 | public ArticleViewModel GetRandomArticle() 35 | { 36 | var article = _db.Articles 37 | .Where(t => t.Status == 0 && t.IsDelete == 0) 38 | .OrderBy(t => Guid.NewGuid()) 39 | .Select(t => new ArticleViewModel 40 | { 41 | Title = t.Title, 42 | Author = t.Author, 43 | Content = t.Details 44 | }).LastOrDefault(); 45 | return article; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/csc.rsp: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | # This file contains command-line options that the C# 4 | # command line compiler (CSC) will process as part 5 | # of every compilation, unless the "/noconfig" option 6 | # is specified. 7 | 8 | # Reference the common Framework libraries 9 | /r:Accessibility.dll 10 | /r:Microsoft.CSharp.dll 11 | /r:System.Configuration.dll 12 | /r:System.Configuration.Install.dll 13 | /r:System.Core.dll 14 | /r:System.Data.dll 15 | /r:System.Data.DataSetExtensions.dll 16 | /r:System.Data.Linq.dll 17 | /r:System.Data.OracleClient.dll 18 | /r:System.Deployment.dll 19 | /r:System.Design.dll 20 | /r:System.DirectoryServices.dll 21 | /r:System.dll 22 | /r:System.Drawing.Design.dll 23 | /r:System.Drawing.dll 24 | /r:System.EnterpriseServices.dll 25 | /r:System.Management.dll 26 | /r:System.Messaging.dll 27 | /r:System.Runtime.Remoting.dll 28 | /r:System.Runtime.Serialization.dll 29 | /r:System.Runtime.Serialization.Formatters.Soap.dll 30 | /r:System.Security.dll 31 | /r:System.ServiceModel.dll 32 | /r:System.ServiceModel.Web.dll 33 | /r:System.ServiceProcess.dll 34 | /r:System.Transactions.dll 35 | /r:System.Web.dll 36 | /r:System.Web.Extensions.Design.dll 37 | /r:System.Web.Extensions.dll 38 | /r:System.Web.Mobile.dll 39 | /r:System.Web.RegularExpressions.dll 40 | /r:System.Web.Services.dll 41 | /r:System.Windows.Forms.dll 42 | /r:System.Workflow.Activities.dll 43 | /r:System.Workflow.ComponentModel.dll 44 | /r:System.Workflow.Runtime.dll 45 | /r:System.Xml.dll 46 | /r:System.Xml.Linq.dll 47 | -------------------------------------------------------------------------------- /iReading/iReading.API/obj/iReading.API.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | F:\------------------------------------------------\iReading\iReading.API\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\qix\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.1 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /iReading/iReading.BLL/obj/iReading.BLL.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | F:\------------------------------------------------\iReading\iReading.BLL\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\qix\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.1 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /iReading/iReading.DAL/obj/iReading.DAL.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | F:\------------------------------------------------\iReading\iReading.DAL\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\qix\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.1 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /iReading/iReading.Job/obj/iReading.Job.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | F:\------------------------------------------------\iReading\iReading.Job\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\qix\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.1 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /iReading/iReading.Web/obj/iReading.Web.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | F:\------------------------------------------------\iReading\iReading.Web\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\qix\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.1 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /iReading/iReading.Entity/obj/iReading.Entity.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | F:\------------------------------------------------\iReading\iReading.Entity\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\qix\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.1 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /iReading/iReading.Utility/obj/iReading.Utility.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | F:\------------------------------------------------\iReading\iReading.Utility\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\qix\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.1 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /iReading/iReading.Entity/Articles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace iReading.Entity 5 | { 6 | public class Articles 7 | { 8 | /// 9 | /// 文章主键 10 | /// 11 | [Key] 12 | public int ArticleId { get; set; } 13 | 14 | /// 15 | /// 文章标题 16 | /// 17 | public string Title { get; set; } 18 | 19 | /// 20 | /// 文章作者 21 | /// 22 | public string Author { get; set; } 23 | 24 | /// 25 | /// 文章概要 26 | /// 27 | public string Summary { get; set; } 28 | 29 | /// 30 | /// 文章详情 31 | /// 32 | public string Details { get; set; } 33 | 34 | /// 35 | /// 文章类型 36 | /// 37 | public string Category { get; set; } 38 | 39 | /// 40 | /// 文章Logo 41 | /// 42 | public string Logo { get; set; } 43 | 44 | /// 45 | /// 发布时间 46 | /// 47 | public DateTime IssueTime { get; set; } 48 | 49 | /// 50 | /// 更新时间 51 | /// 52 | public DateTime UpdateTime { get; set; } 53 | 54 | /// 55 | /// 文章状态 56 | /// 0 ---- 发布 57 | /// 1 ---- 草稿 58 | /// 2 ---- 定时 59 | /// 60 | public int Status { get; set; } 61 | 62 | /// 63 | /// 是否删除 64 | /// 0 ---- 未删除 65 | /// 1 ---- 已删除 66 | /// 67 | public int IsDelete { get; set; } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/vbc.rsp: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. 2 | 3 | # This file contains command-line options that the VB 4 | # command line compiler (VBC) will process as part 5 | # of every compilation, unless the "/noconfig" option 6 | # is specified. 7 | 8 | # Reference the common Framework libraries 9 | /r:Accessibility.dll 10 | /r:System.Configuration.dll 11 | /r:System.Configuration.Install.dll 12 | /r:System.Data.dll 13 | /r:System.Data.OracleClient.dll 14 | /r:System.Deployment.dll 15 | /r:System.Design.dll 16 | /r:System.DirectoryServices.dll 17 | /r:System.dll 18 | /r:System.Drawing.Design.dll 19 | /r:System.Drawing.dll 20 | /r:System.EnterpriseServices.dll 21 | /r:System.Management.dll 22 | /r:System.Messaging.dll 23 | /r:System.Runtime.Remoting.dll 24 | /r:System.Runtime.Serialization.Formatters.Soap.dll 25 | /r:System.Security.dll 26 | /r:System.ServiceProcess.dll 27 | /r:System.Transactions.dll 28 | /r:System.Web.dll 29 | /r:System.Web.Mobile.dll 30 | /r:System.Web.RegularExpressions.dll 31 | /r:System.Web.Services.dll 32 | /r:System.Windows.Forms.dll 33 | /r:System.XML.dll 34 | 35 | /r:System.Workflow.Activities.dll 36 | /r:System.Workflow.ComponentModel.dll 37 | /r:System.Workflow.Runtime.dll 38 | /r:System.Runtime.Serialization.dll 39 | /r:System.ServiceModel.dll 40 | 41 | /r:System.Core.dll 42 | /r:System.Xml.Linq.dll 43 | /r:System.Data.Linq.dll 44 | /r:System.Data.DataSetExtensions.dll 45 | /r:System.Web.Extensions.dll 46 | /r:System.Web.Extensions.Design.dll 47 | /r:System.ServiceModel.Web.dll 48 | 49 | # Import System and Microsoft.VisualBasic 50 | /imports:System 51 | /imports:Microsoft.VisualBasic 52 | /imports:System.Linq 53 | /imports:System.Xml.Linq 54 | 55 | /optioninfer+ 56 | -------------------------------------------------------------------------------- /iReading/iReading.Web/Startup.cs: -------------------------------------------------------------------------------- 1 | using iReading.DAL; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.EntityFrameworkCore; 5 | using Microsoft.Extensions.Configuration; 6 | using Microsoft.Extensions.DependencyInjection; 7 | 8 | namespace iReading.Web 9 | { 10 | public class Startup 11 | { 12 | public static string connection; 13 | 14 | public Startup(IConfiguration configuration) 15 | { 16 | Configuration = configuration; 17 | } 18 | 19 | public IConfiguration Configuration { get; } 20 | 21 | // This method gets called by the runtime. Use this method to add services to the container. 22 | public void ConfigureServices(IServiceCollection services) 23 | { 24 | services.AddMvc(); 25 | 26 | connection = Configuration.GetConnectionString("SqlServerConnection"); 27 | services.AddDbContext(options => options.UseSqlServer(connection)); 28 | } 29 | 30 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 31 | public void Configure(IApplicationBuilder app, IHostingEnvironment env) 32 | { 33 | if (env.IsDevelopment()) 34 | { 35 | app.UseDeveloperExceptionPage(); 36 | app.UseBrowserLink(); 37 | } 38 | else 39 | { 40 | app.UseExceptionHandler("/Home/Error"); 41 | } 42 | 43 | app.UseStaticFiles(); 44 | 45 | app.UseMvc(routes => 46 | { 47 | routes.MapRoute( 48 | name: "Home", 49 | template: "{controller=Home}/{action=Index}"); 50 | }); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Reading/Reading.Job/Program.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | using Reading.Bll; 3 | using Reading.Model; 4 | using Reading.Utility; 5 | using System; 6 | 7 | namespace Reading.Job 8 | { 9 | class Program 10 | { 11 | static void Main() 12 | { 13 | const string api = "https://interface.meiriyiwen.com/article/random"; 14 | for (var i = 0; i < 10; i++) 15 | { 16 | var json = HttpHelper.HttpGet(api); 17 | var obj = JObject.Parse(json); 18 | try 19 | { 20 | var author = obj["data"]["author"].ToString(); 21 | var title = obj["data"]["title"].ToString(); 22 | var digest = obj["data"]["digest"].ToString(); 23 | var content = obj["data"]["content"].ToString(); 24 | var words = obj["data"]["wc"].ToString(); 25 | 26 | var articles = new Articles 27 | { 28 | Id = Guid.NewGuid().ToString(), 29 | Author = author, 30 | Title = title, 31 | Digest = digest, 32 | Content = content, 33 | Words = words, 34 | CreateTime = DateTime.Now 35 | }; 36 | var bll = new ArticleBll(); 37 | if (bll.IsExistArticle(author, title)) 38 | { 39 | Console.WriteLine("exist"); 40 | } 41 | else 42 | { 43 | var v = bll.InsertArticle(articles); 44 | Console.WriteLine(v >= 1 ? "ojbk" : "error"); 45 | } 46 | } 47 | catch (Exception e) 48 | { 49 | Console.WriteLine(e); 50 | } 51 | } 52 | } 53 | } 54 | } -------------------------------------------------------------------------------- /Reading/Reading.Web/Views/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /iReading/iReading.API/obj/iReading.API.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /iReading/iReading.Web/obj/iReading.Web.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Reading/Reading.Web/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @ViewBag.Title 8 | 9 | 10 | 11 | 12 | 33 | @RenderBody() 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /iReading/iReading.UnitTest/obj/iReading.UnitTest.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | True 5 | NuGet 6 | F:\------------------------------------------------\iReading\iReading.UnitTest\obj\project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\qix\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder 9 | PackageReference 10 | 4.3.1 11 | 12 | 13 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /iReading/iReading.Web/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @ViewData["Title"] 8 | 9 | 10 | 11 | 12 | 13 | 34 | @RenderBody() 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Reading/Reading.Model/Reading.Model.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {4358A329-97B5-4902-BC65-2837C6B59F83} 8 | Library 9 | Properties 10 | Reading.Model 11 | Reading.Model 12 | v4.6.1 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Reading/Reading.Utility/Reading.Utility.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {6D8F16F6-21C4-4004-93A6-B1A070EA0EEC} 8 | Library 9 | Properties 10 | Reading.Utility 11 | Reading.Utility 12 | v4.6.1 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Reading/Reading.Web/Reading.Web.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | MvcControllerEmptyScaffolder 12 | root/Controller 13 | 600 14 | False 15 | False 16 | False 17 | 18 | False 19 | 600 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | CurrentPage 28 | True 29 | False 30 | False 31 | False 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | True 41 | True 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Reading/Reading.Web/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 40 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /iReading/iReading.DAL/Migrations/ArticleDbContextModelSnapshot.cs: -------------------------------------------------------------------------------- 1 | // 2 | using iReading.DAL; 3 | using Microsoft.EntityFrameworkCore; 4 | using Microsoft.EntityFrameworkCore.Infrastructure; 5 | using Microsoft.EntityFrameworkCore.Metadata; 6 | using Microsoft.EntityFrameworkCore.Migrations; 7 | using Microsoft.EntityFrameworkCore.Storage; 8 | using Microsoft.EntityFrameworkCore.Storage.Internal; 9 | using System; 10 | 11 | namespace iReading.DAL.Migrations 12 | { 13 | [DbContext(typeof(ArticleDbContext))] 14 | partial class ArticleDbContextModelSnapshot : ModelSnapshot 15 | { 16 | protected override void BuildModel(ModelBuilder modelBuilder) 17 | { 18 | #pragma warning disable 612, 618 19 | modelBuilder 20 | .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") 21 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 22 | 23 | modelBuilder.Entity("iReading.Entity.Articles", b => 24 | { 25 | b.Property("ArticleId") 26 | .ValueGeneratedOnAdd(); 27 | 28 | b.Property("Author"); 29 | 30 | b.Property("Category"); 31 | 32 | b.Property("Details"); 33 | 34 | b.Property("IsDelete"); 35 | 36 | b.Property("IssueTime"); 37 | 38 | b.Property("Logo"); 39 | 40 | b.Property("Status"); 41 | 42 | b.Property("Summary"); 43 | 44 | b.Property("Title"); 45 | 46 | b.Property("UpdateTime"); 47 | 48 | b.HasKey("ArticleId"); 49 | 50 | b.ToTable("Articles"); 51 | }); 52 | 53 | modelBuilder.Entity("iReading.Entity.ArticleViews", b => 54 | { 55 | b.Property("ArticleId") 56 | .ValueGeneratedOnAdd(); 57 | 58 | b.Property("City"); 59 | 60 | b.Property("Hits"); 61 | 62 | b.Property("ShowHits"); 63 | 64 | b.Property("UserAgent"); 65 | 66 | b.Property("UserIp"); 67 | 68 | b.Property("ViewTime"); 69 | 70 | b.HasKey("ArticleId"); 71 | 72 | b.ToTable("ArticleViews"); 73 | }); 74 | #pragma warning restore 612, 618 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /iReading/iReading.DAL/Migrations/20170918090820_Init.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | using iReading.DAL; 3 | using Microsoft.EntityFrameworkCore; 4 | using Microsoft.EntityFrameworkCore.Infrastructure; 5 | using Microsoft.EntityFrameworkCore.Metadata; 6 | using Microsoft.EntityFrameworkCore.Migrations; 7 | using Microsoft.EntityFrameworkCore.Storage; 8 | using Microsoft.EntityFrameworkCore.Storage.Internal; 9 | using System; 10 | 11 | namespace iReading.DAL.Migrations 12 | { 13 | [DbContext(typeof(ArticleDbContext))] 14 | [Migration("20170918090820_Init")] 15 | partial class Init 16 | { 17 | protected override void BuildTargetModel(ModelBuilder modelBuilder) 18 | { 19 | #pragma warning disable 612, 618 20 | modelBuilder 21 | .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") 22 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 23 | 24 | modelBuilder.Entity("iReading.Entity.Articles", b => 25 | { 26 | b.Property("ArticleId") 27 | .ValueGeneratedOnAdd(); 28 | 29 | b.Property("Author"); 30 | 31 | b.Property("Category"); 32 | 33 | b.Property("Details"); 34 | 35 | b.Property("IsDelete"); 36 | 37 | b.Property("IssueTime"); 38 | 39 | b.Property("Logo"); 40 | 41 | b.Property("Status"); 42 | 43 | b.Property("Summary"); 44 | 45 | b.Property("Title"); 46 | 47 | b.Property("UpdateTime"); 48 | 49 | b.HasKey("ArticleId"); 50 | 51 | b.ToTable("Articles"); 52 | }); 53 | 54 | modelBuilder.Entity("iReading.Entity.ArticleViews", b => 55 | { 56 | b.Property("ArticleId") 57 | .ValueGeneratedOnAdd(); 58 | 59 | b.Property("City"); 60 | 61 | b.Property("Hits"); 62 | 63 | b.Property("ShowHits"); 64 | 65 | b.Property("UserAgent"); 66 | 67 | b.Property("UserIp"); 68 | 69 | b.Property("ViewTime"); 70 | 71 | b.HasKey("ArticleId"); 72 | 73 | b.ToTable("ArticleViews"); 74 | }); 75 | #pragma warning restore 612, 618 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Reading/Reading.Factory/Reading.Factory.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F3EE27FE-0757-4604-BFEE-B89A5965C06D} 8 | Library 9 | Properties 10 | Reading.Factory 11 | Reading.Factory 12 | v4.6.1 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | ..\packages\MySql.Data.6.10.4\lib\net452\MySql.Data.dll 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Reading/Reading.Web/style/main.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | ::-moz-selection { 6 | background: #0f0; 7 | color: #000; 8 | text-shadow: none; 9 | } 10 | 11 | ::selection { 12 | background: #0f0; 13 | color: #000; 14 | text-shadow: none; 15 | } 16 | 17 | ::-webkit-scrollbar { 18 | width: 8px; 19 | height: 8px; 20 | } 21 | 22 | ::-webkit-scrollbar-track { 23 | background: #fff; 24 | -webkit-box-shadow: inset 1px 1px 2px #E0E0E0; 25 | border: 1px solid #D8D8D8; 26 | } 27 | 28 | ::-webkit-scrollbar-thumb { 29 | background: #e8e8e8; 30 | -webkit-box-shadow: inset 1px 1px 2px rgba(155, 155, 155, 0.4); 31 | } 32 | 33 | ::-webkit-scrollbar-thumb:hover { 34 | -webkit-box-shadow: inset 1px 1px 10px rgba(0, 0, 0, 0.3); 35 | } 36 | 37 | ::-webkit-scrollbar-thumb:active { 38 | background: #888; 39 | -webkit-box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3); 40 | } 41 | 42 | body { 43 | margin: 0; 44 | padding: 0; 45 | background-attachment: fixed; 46 | background-clip: border-box; 47 | background-color: rgba(248, 248, 248, 0.8); 48 | background-origin: padding-box; 49 | background-position: center top; 50 | background-repeat: no-repeat; 51 | background-size: cover; 52 | width: 100%; 53 | min-height: 100%; 54 | background-image: url(""); 55 | position: relative; 56 | font-family: "Microsoft YaHei"; 57 | } 58 | 59 | body:after { 60 | clear: both; 61 | display: block; 62 | content: "."; 63 | visibility: hidden; 64 | } 65 | 66 | img { 67 | border: none; 68 | } 69 | 70 | .navbar { 71 | opacity: .8; 72 | } 73 | 74 | .navbar-right { 75 | margin-right: 0; 76 | } 77 | 78 | .content-box { 79 | padding-top: 100px; 80 | } 81 | 82 | .panel { 83 | background-color: #f8f8f8; 84 | opacity: .8; 85 | } 86 | 87 | .title { 88 | color: #000; 89 | font-weight: normal; 90 | letter-spacing: 4px; 91 | margin: 0 0 30px; 92 | position: relative; 93 | text-align: center; 94 | text-transform: uppercase; 95 | } 96 | 97 | .author { 98 | color: #999; 99 | margin: 40px 0 50px; 100 | text-align: center; 101 | font-size: 16px; 102 | font-weight: normal; 103 | } 104 | 105 | .content p { 106 | color: #000; 107 | font-size: 16px; 108 | font-weight: normal; 109 | line-height: 30px; 110 | margin-bottom: 30px; 111 | text-align: justify; 112 | padding: 0 20px; 113 | text-indent: 2em; 114 | } 115 | 116 | .random { 117 | text-align: center; 118 | padding: 50px 0; 119 | } 120 | 121 | .random button::before { 122 | content: "继续阅读"; 123 | } -------------------------------------------------------------------------------- /iReading/iReading.Web/wwwroot/style/main.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | ::-moz-selection { 6 | background: #0f0; 7 | color: #000; 8 | text-shadow: none; 9 | } 10 | 11 | ::selection { 12 | background: #0f0; 13 | color: #000; 14 | text-shadow: none; 15 | } 16 | 17 | ::-webkit-scrollbar { 18 | width: 8px; 19 | height: 8px; 20 | } 21 | 22 | ::-webkit-scrollbar-track { 23 | background: #fff; 24 | -webkit-box-shadow: inset 1px 1px 2px #E0E0E0; 25 | border: 1px solid #D8D8D8; 26 | } 27 | 28 | ::-webkit-scrollbar-thumb { 29 | background: #e8e8e8; 30 | -webkit-box-shadow: inset 1px 1px 2px rgba(155, 155, 155, 0.4); 31 | } 32 | 33 | ::-webkit-scrollbar-thumb:hover { 34 | -webkit-box-shadow: inset 1px 1px 10px rgba(0, 0, 0, 0.3); 35 | } 36 | 37 | ::-webkit-scrollbar-thumb:active { 38 | background: #888; 39 | -webkit-box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.3); 40 | } 41 | 42 | body { 43 | margin: 0; 44 | padding: 0; 45 | background-attachment: fixed; 46 | background-clip: border-box; 47 | background-color: rgba(248, 248, 248, 0.8); 48 | background-origin: padding-box; 49 | background-position: center top; 50 | background-repeat: no-repeat; 51 | background-size: cover; 52 | width: 100%; 53 | min-height: 100%; 54 | background-image: url(""); 55 | position: relative; 56 | font-family: "Microsoft YaHei"; 57 | } 58 | 59 | body:after { 60 | clear: both; 61 | display: block; 62 | content: "."; 63 | visibility: hidden; 64 | } 65 | 66 | img { 67 | border: none; 68 | } 69 | 70 | .navbar { 71 | opacity: .8; 72 | } 73 | 74 | .navbar-right { 75 | margin-right: 0; 76 | } 77 | 78 | .content-box { 79 | padding-top: 100px; 80 | } 81 | 82 | .panel { 83 | background-color: #f8f8f8; 84 | opacity: .8; 85 | } 86 | 87 | .title { 88 | color: #000; 89 | font-weight: normal; 90 | letter-spacing: 4px; 91 | margin: 0 0 30px; 92 | position: relative; 93 | text-align: center; 94 | text-transform: uppercase; 95 | } 96 | 97 | .author { 98 | color: #999; 99 | margin: 40px 0 50px; 100 | text-align: center; 101 | font-size: 16px; 102 | font-weight: normal; 103 | } 104 | 105 | .content p { 106 | color: #000; 107 | font-size: 16px; 108 | font-weight: normal; 109 | line-height: 30px; 110 | margin-bottom: 30px; 111 | text-align: justify; 112 | padding: 0 20px; 113 | text-indent: 2em; 114 | } 115 | 116 | .random { 117 | text-align: center; 118 | padding: 50px 0; 119 | } 120 | 121 | .random button::before { 122 | content: "继续阅读"; 123 | } -------------------------------------------------------------------------------- /Reading/Reading.Bll/Reading.Bll.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {C7472C2C-3EAC-453D-AED9-99D199CD6164} 8 | Library 9 | Properties 10 | Reading.Bll 11 | Reading.Bll 12 | v4.6.1 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | {f9cac210-74fc-4a1b-ab53-8f5eaa929f59} 49 | Reading.Dal 50 | 51 | 52 | {4358A329-97B5-4902-BC65-2837C6B59F83} 53 | Reading.Model 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /Reading/Reading.Dal/Reading.Dal.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {F9CAC210-74FC-4A1B-AB53-8F5EAA929F59} 8 | Library 9 | Properties 10 | Reading.Dal 11 | Reading.Dal 12 | v4.6.1 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | ..\packages\Dapper.1.50.4\lib\net451\Dapper.dll 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | {f3ee27fe-0757-4604-bfee-b89a5965c06d} 52 | Reading.Factory 53 | 54 | 55 | {4358a329-97b5-4902-bc65-2837c6b59f83} 56 | Reading.Model 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /iReading/iReading.DAL/Migrations/20170918090820_Init.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Metadata; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace iReading.DAL.Migrations 7 | { 8 | public partial class Init : Migration 9 | { 10 | protected override void Up(MigrationBuilder migrationBuilder) 11 | { 12 | migrationBuilder.CreateTable( 13 | name: "Articles", 14 | columns: table => new 15 | { 16 | ArticleId = table.Column(type: "int", nullable: false) 17 | .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), 18 | Author = table.Column(type: "nvarchar(100)", nullable: true), 19 | Category = table.Column(type: "nvarchar(100)", nullable: false), 20 | Details = table.Column(type: "nvarchar(max)", nullable: false), 21 | IsDelete = table.Column(type: "int", nullable: false), 22 | IssueTime = table.Column(type: "datetime", nullable: false), 23 | Logo = table.Column(type: "nvarchar(500)", nullable: true), 24 | Status = table.Column(type: "int", nullable: false), 25 | Summary = table.Column(type: "nvarchar(500)", nullable: false), 26 | Title = table.Column(type: "nvarchar(200)", nullable: false), 27 | UpdateTime = table.Column(type: "datetime", nullable: false) 28 | }, 29 | constraints: table => 30 | { 31 | table.PrimaryKey("PK_Articles", x => x.ArticleId); 32 | }); 33 | 34 | migrationBuilder.CreateTable( 35 | name: "ArticleViews", 36 | columns: table => new 37 | { 38 | ArticleId = table.Column(type: "int", nullable: false) 39 | .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), 40 | City = table.Column(type: "nvarchar(100)", nullable: false), 41 | Hits = table.Column(type: "int", nullable: false), 42 | ShowHits = table.Column(type: "int", nullable: false), 43 | UserAgent = table.Column(type: "int", nullable: false), 44 | UserIp = table.Column(type: "nvarchar(100)", nullable: false), 45 | ViewTime = table.Column(type: "datetime", nullable: false) 46 | }, 47 | constraints: table => 48 | { 49 | table.PrimaryKey("PK_ArticleViews", x => x.ArticleId); 50 | }); 51 | } 52 | 53 | protected override void Down(MigrationBuilder migrationBuilder) 54 | { 55 | migrationBuilder.DropTable( 56 | name: "Articles"); 57 | 58 | migrationBuilder.DropTable( 59 | name: "ArticleViews"); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Reading/Reading.Job/Reading.Job.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {EF83EF29-04E1-4D63-A373-2FDB5A3282A5} 8 | Exe 9 | Reading.Job 10 | Reading.Job 11 | v4.6.1 12 | 512 13 | true 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | {C7472C2C-3EAC-453D-AED9-99D199CD6164} 58 | Reading.Bll 59 | 60 | 61 | {4358A329-97B5-4902-BC65-2837C6B59F83} 62 | Reading.Model 63 | 64 | 65 | {6D8F16F6-21C4-4004-93A6-B1A070EA0EEC} 66 | Reading.Utility 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /Reading/Reading.Dal/ArticleDal.cs: -------------------------------------------------------------------------------- 1 | using Dapper; 2 | using Reading.Factory; 3 | using Reading.Model; 4 | using System.Collections.Generic; 5 | using System.Data; 6 | using System.Linq; 7 | 8 | namespace Reading.Dal 9 | { 10 | public class ArticleDal 11 | { 12 | private IDbConnection _conn; 13 | public IDbConnection Conn 14 | { 15 | get 16 | { 17 | return _conn = ConnectionFactory.CreateConnection(); 18 | } 19 | } 20 | 21 | /// 22 | /// Add the article 23 | /// 24 | /// 25 | /// 26 | public int InsertArticle(Articles articles) 27 | { 28 | using (Conn) 29 | { 30 | var sql = @"INSERT INTO Articles 31 | ( Id , 32 | Author , 33 | Title , 34 | Digest , 35 | Content , 36 | Words , 37 | CreateTime 38 | ) 39 | VALUES ( @Id , 40 | @Author , 41 | @Title , 42 | @Digest , 43 | @Content , 44 | @Words , 45 | @CreateTime 46 | )"; 47 | return Conn.Execute(sql, articles); 48 | } 49 | } 50 | 51 | /// 52 | /// Whether the article exists or not 53 | /// 54 | /// 55 | /// 56 | /// 57 | public int IsExistArticle(string author, string title) 58 | { 59 | using (Conn) 60 | { 61 | var sql = @"SELECT 62 | COUNT(*) 63 | FROM 64 | Articles 65 | WHERE 66 | Title = @Title 67 | AND Author = @Author"; 68 | return int.Parse(Conn.ExecuteScalar(sql, new { Author = author, Title = title }).ToString()); 69 | } 70 | } 71 | 72 | /// 73 | /// Articles List very slow 74 | /// 75 | /// 76 | public IEnumerable Get_Articles_List() 77 | { 78 | using (Conn) 79 | { 80 | var sql = @"SELECT * FROM `articles`"; 81 | return Conn.Query(sql); 82 | } 83 | } 84 | 85 | /// 86 | /// New Article 87 | /// 88 | /// 89 | public Articles Get_New_Article() 90 | { 91 | using (Conn) 92 | { 93 | var sql = "SELECT * FROM `articles` order by CreateTime DESC LIMIT 1"; 94 | return Conn.Query(sql).FirstOrDefault(); 95 | } 96 | } 97 | 98 | /// 99 | /// Random Article 100 | /// 101 | /// 102 | public Articles Get_Random_Article() 103 | { 104 | using (Conn) 105 | { 106 | var sql = "SELECT * FROM `articles` order by rand() LIMIT 1"; 107 | return Conn.Query(sql).FirstOrDefault(); 108 | } 109 | } 110 | } 111 | } -------------------------------------------------------------------------------- /Reading/Reading.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27004.2009 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reading.Dal", "Reading.Dal\Reading.Dal.csproj", "{F9CAC210-74FC-4A1B-AB53-8F5EAA929F59}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reading.Bll", "Reading.Bll\Reading.Bll.csproj", "{C7472C2C-3EAC-453D-AED9-99D199CD6164}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reading.Model", "Reading.Model\Reading.Model.csproj", "{4358A329-97B5-4902-BC65-2837C6B59F83}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reading.Web", "Reading.Web\Reading.Web.csproj", "{8A221A19-E7C9-4ACB-8F7D-93FB7B250B82}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reading.Factory", "Reading.Factory\Reading.Factory.csproj", "{F3EE27FE-0757-4604-BFEE-B89A5965C06D}" 15 | EndProject 16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reading.Job", "Reading.Job\Reading.Job.csproj", "{EF83EF29-04E1-4D63-A373-2FDB5A3282A5}" 17 | EndProject 18 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reading.Utility", "Reading.Utility\Reading.Utility.csproj", "{6D8F16F6-21C4-4004-93A6-B1A070EA0EEC}" 19 | EndProject 20 | Global 21 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 22 | Debug|Any CPU = Debug|Any CPU 23 | Release|Any CPU = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 | {F9CAC210-74FC-4A1B-AB53-8F5EAA929F59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {F9CAC210-74FC-4A1B-AB53-8F5EAA929F59}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {F9CAC210-74FC-4A1B-AB53-8F5EAA929F59}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {F9CAC210-74FC-4A1B-AB53-8F5EAA929F59}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {C7472C2C-3EAC-453D-AED9-99D199CD6164}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {C7472C2C-3EAC-453D-AED9-99D199CD6164}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {C7472C2C-3EAC-453D-AED9-99D199CD6164}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {C7472C2C-3EAC-453D-AED9-99D199CD6164}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {4358A329-97B5-4902-BC65-2837C6B59F83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 | {4358A329-97B5-4902-BC65-2837C6B59F83}.Debug|Any CPU.Build.0 = Debug|Any CPU 36 | {4358A329-97B5-4902-BC65-2837C6B59F83}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {4358A329-97B5-4902-BC65-2837C6B59F83}.Release|Any CPU.Build.0 = Release|Any CPU 38 | {8A221A19-E7C9-4ACB-8F7D-93FB7B250B82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 39 | {8A221A19-E7C9-4ACB-8F7D-93FB7B250B82}.Debug|Any CPU.Build.0 = Debug|Any CPU 40 | {8A221A19-E7C9-4ACB-8F7D-93FB7B250B82}.Release|Any CPU.ActiveCfg = Release|Any CPU 41 | {8A221A19-E7C9-4ACB-8F7D-93FB7B250B82}.Release|Any CPU.Build.0 = Release|Any CPU 42 | {F3EE27FE-0757-4604-BFEE-B89A5965C06D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 43 | {F3EE27FE-0757-4604-BFEE-B89A5965C06D}.Debug|Any CPU.Build.0 = Debug|Any CPU 44 | {F3EE27FE-0757-4604-BFEE-B89A5965C06D}.Release|Any CPU.ActiveCfg = Release|Any CPU 45 | {F3EE27FE-0757-4604-BFEE-B89A5965C06D}.Release|Any CPU.Build.0 = Release|Any CPU 46 | {EF83EF29-04E1-4D63-A373-2FDB5A3282A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 47 | {EF83EF29-04E1-4D63-A373-2FDB5A3282A5}.Debug|Any CPU.Build.0 = Debug|Any CPU 48 | {EF83EF29-04E1-4D63-A373-2FDB5A3282A5}.Release|Any CPU.ActiveCfg = Release|Any CPU 49 | {EF83EF29-04E1-4D63-A373-2FDB5A3282A5}.Release|Any CPU.Build.0 = Release|Any CPU 50 | {6D8F16F6-21C4-4004-93A6-B1A070EA0EEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 51 | {6D8F16F6-21C4-4004-93A6-B1A070EA0EEC}.Debug|Any CPU.Build.0 = Debug|Any CPU 52 | {6D8F16F6-21C4-4004-93A6-B1A070EA0EEC}.Release|Any CPU.ActiveCfg = Release|Any CPU 53 | {6D8F16F6-21C4-4004-93A6-B1A070EA0EEC}.Release|Any CPU.Build.0 = Release|Any CPU 54 | EndGlobalSection 55 | GlobalSection(SolutionProperties) = preSolution 56 | HideSolutionNode = FALSE 57 | EndGlobalSection 58 | GlobalSection(ExtensibilityGlobals) = postSolution 59 | SolutionGuid = {47F1328E-19B1-4225-B343-12DF0E759415} 60 | EndGlobalSection 61 | EndGlobal 62 | -------------------------------------------------------------------------------- /Reading/Reading.Utility/HttpHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Net; 4 | using System.Text; 5 | 6 | namespace Reading.Utility 7 | { 8 | public class HttpHelper 9 | { 10 | /// 11 | /// Http同步Get同步请求 12 | /// 13 | /// Url地址 14 | /// 编码(默认UTF8) 15 | /// 16 | public static string HttpGet(string url, Encoding encode = null) 17 | { 18 | string result; 19 | 20 | try 21 | { 22 | var webClient = new WebClient { Encoding = Encoding.UTF8 }; 23 | 24 | if (encode != null) 25 | webClient.Encoding = encode; 26 | 27 | result = webClient.DownloadString(url); 28 | } 29 | catch (Exception ex) 30 | { 31 | result = ex.Message; 32 | } 33 | 34 | return result; 35 | } 36 | 37 | /// 38 | /// Http同步Get异步请求 39 | /// 40 | /// Url地址 41 | /// 回调事件 42 | /// 编码(默认UTF8) 43 | public static void HttpGetAsync(string url, 44 | DownloadStringCompletedEventHandler callBackDownStringCompleted = null, Encoding encode = null) 45 | { 46 | var webClient = new WebClient { Encoding = Encoding.UTF8 }; 47 | 48 | if (encode != null) 49 | webClient.Encoding = encode; 50 | 51 | if (callBackDownStringCompleted != null) 52 | webClient.DownloadStringCompleted += callBackDownStringCompleted; 53 | 54 | webClient.DownloadStringAsync(new Uri(url)); 55 | } 56 | 57 | /// 58 | /// Http同步Post同步请求 59 | /// 60 | /// Url地址 61 | /// 请求Url数据 62 | /// 编码(默认UTF8) 63 | /// 64 | public static string HttpPost(string url, string postStr = "", Encoding encode = null) 65 | { 66 | string result; 67 | 68 | try 69 | { 70 | var webClient = new WebClient { Encoding = Encoding.UTF8 }; 71 | 72 | if (encode != null) 73 | webClient.Encoding = encode; 74 | 75 | var sendData = Encoding.GetEncoding("GB2312").GetBytes(postStr); 76 | 77 | webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded"); 78 | webClient.Headers.Add("ContentLength", sendData.Length.ToString(CultureInfo.InvariantCulture)); 79 | 80 | var readData = webClient.UploadData(url, "POST", sendData); 81 | 82 | result = Encoding.GetEncoding("GB2312").GetString(readData); 83 | 84 | } 85 | catch (Exception ex) 86 | { 87 | result = ex.Message; 88 | } 89 | 90 | return result; 91 | } 92 | 93 | /// 94 | /// Http同步Post异步请求 95 | /// 96 | /// Url地址 97 | /// 请求Url数据 98 | /// 回调事件 99 | /// 100 | public static void HttpPostAsync(string url, string postStr = "", 101 | UploadDataCompletedEventHandler callBackUploadDataCompleted = null, Encoding encode = null) 102 | { 103 | var webClient = new WebClient { Encoding = Encoding.UTF8 }; 104 | 105 | if (encode != null) 106 | webClient.Encoding = encode; 107 | 108 | var sendData = Encoding.GetEncoding("GB2312").GetBytes(postStr); 109 | 110 | webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded"); 111 | webClient.Headers.Add("ContentLength", sendData.Length.ToString(CultureInfo.InvariantCulture)); 112 | 113 | if (callBackUploadDataCompleted != null) 114 | webClient.UploadDataCompleted += callBackUploadDataCompleted; 115 | 116 | webClient.UploadDataAsync(new Uri(url), "POST", sendData); 117 | } 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /iReading/iReading.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26730.15 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iReading.DAL", "iReading.DAL\iReading.DAL.csproj", "{5716D2F7-6045-45CF-BC89-6EC13E21BBBE}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iReading.BLL", "iReading.BLL\iReading.BLL.csproj", "{E329F184-5281-4D96-8A98-D1EAEC69AB32}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iReading.Entity", "iReading.Entity\iReading.Entity.csproj", "{B8950211-E885-427B-ABD7-F69516CC40D3}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iReading.Web", "iReading.Web\iReading.Web.csproj", "{6199A691-2CD7-486D-936D-91F590508DFC}" 13 | EndProject 14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iReading.Job", "iReading.Job\iReading.Job.csproj", "{0266641C-0322-4251-A7AB-1E7C89C9F172}" 15 | EndProject 16 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iReading.API", "iReading.API\iReading.API.csproj", "{9B045847-3E23-43B4-9B03-F083E3F4A403}" 17 | EndProject 18 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iReading.Utility", "iReading.Utility\iReading.Utility.csproj", "{8C681F15-E6BF-4AA5-9659-FA0A6C56EF6C}" 19 | EndProject 20 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iReading.UnitTest", "iReading.UnitTest\iReading.UnitTest.csproj", "{560A1D28-DB3F-4774-80A3-268A4E41F79B}" 21 | EndProject 22 | Global 23 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 24 | Debug|Any CPU = Debug|Any CPU 25 | Release|Any CPU = Release|Any CPU 26 | EndGlobalSection 27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 28 | {5716D2F7-6045-45CF-BC89-6EC13E21BBBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {5716D2F7-6045-45CF-BC89-6EC13E21BBBE}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {5716D2F7-6045-45CF-BC89-6EC13E21BBBE}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {5716D2F7-6045-45CF-BC89-6EC13E21BBBE}.Release|Any CPU.Build.0 = Release|Any CPU 32 | {E329F184-5281-4D96-8A98-D1EAEC69AB32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {E329F184-5281-4D96-8A98-D1EAEC69AB32}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {E329F184-5281-4D96-8A98-D1EAEC69AB32}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {E329F184-5281-4D96-8A98-D1EAEC69AB32}.Release|Any CPU.Build.0 = Release|Any CPU 36 | {B8950211-E885-427B-ABD7-F69516CC40D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 37 | {B8950211-E885-427B-ABD7-F69516CC40D3}.Debug|Any CPU.Build.0 = Debug|Any CPU 38 | {B8950211-E885-427B-ABD7-F69516CC40D3}.Release|Any CPU.ActiveCfg = Release|Any CPU 39 | {B8950211-E885-427B-ABD7-F69516CC40D3}.Release|Any CPU.Build.0 = Release|Any CPU 40 | {6199A691-2CD7-486D-936D-91F590508DFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 41 | {6199A691-2CD7-486D-936D-91F590508DFC}.Debug|Any CPU.Build.0 = Debug|Any CPU 42 | {6199A691-2CD7-486D-936D-91F590508DFC}.Release|Any CPU.ActiveCfg = Release|Any CPU 43 | {6199A691-2CD7-486D-936D-91F590508DFC}.Release|Any CPU.Build.0 = Release|Any CPU 44 | {0266641C-0322-4251-A7AB-1E7C89C9F172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 45 | {0266641C-0322-4251-A7AB-1E7C89C9F172}.Debug|Any CPU.Build.0 = Debug|Any CPU 46 | {0266641C-0322-4251-A7AB-1E7C89C9F172}.Release|Any CPU.ActiveCfg = Release|Any CPU 47 | {0266641C-0322-4251-A7AB-1E7C89C9F172}.Release|Any CPU.Build.0 = Release|Any CPU 48 | {9B045847-3E23-43B4-9B03-F083E3F4A403}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 49 | {9B045847-3E23-43B4-9B03-F083E3F4A403}.Debug|Any CPU.Build.0 = Debug|Any CPU 50 | {9B045847-3E23-43B4-9B03-F083E3F4A403}.Release|Any CPU.ActiveCfg = Release|Any CPU 51 | {9B045847-3E23-43B4-9B03-F083E3F4A403}.Release|Any CPU.Build.0 = Release|Any CPU 52 | {8C681F15-E6BF-4AA5-9659-FA0A6C56EF6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 53 | {8C681F15-E6BF-4AA5-9659-FA0A6C56EF6C}.Debug|Any CPU.Build.0 = Debug|Any CPU 54 | {8C681F15-E6BF-4AA5-9659-FA0A6C56EF6C}.Release|Any CPU.ActiveCfg = Release|Any CPU 55 | {8C681F15-E6BF-4AA5-9659-FA0A6C56EF6C}.Release|Any CPU.Build.0 = Release|Any CPU 56 | {560A1D28-DB3F-4774-80A3-268A4E41F79B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 57 | {560A1D28-DB3F-4774-80A3-268A4E41F79B}.Debug|Any CPU.Build.0 = Debug|Any CPU 58 | {560A1D28-DB3F-4774-80A3-268A4E41F79B}.Release|Any CPU.ActiveCfg = Release|Any CPU 59 | {560A1D28-DB3F-4774-80A3-268A4E41F79B}.Release|Any CPU.Build.0 = Release|Any CPU 60 | EndGlobalSection 61 | GlobalSection(SolutionProperties) = preSolution 62 | HideSolutionNode = FALSE 63 | EndGlobalSection 64 | GlobalSection(ExtensibilityGlobals) = postSolution 65 | SolutionGuid = {58F636E9-9CB2-492B-B077-C1168F238496} 66 | EndGlobalSection 67 | EndGlobal 68 | -------------------------------------------------------------------------------- /iReading/iReading.Utility/HttpHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Net; 5 | using System.Text; 6 | using System.Web; 7 | 8 | namespace iReading.Utility 9 | { 10 | public class HttpHelper 11 | { 12 | /// 13 | /// Http (GET/POST) 14 | /// 15 | /// 请求URL 16 | /// 请求参数 17 | /// 请求方法 18 | /// 响应内容 19 | public static string SendPost(string url, IDictionary parameters, string method) 20 | { 21 | if (method.ToLower() == "post") 22 | { 23 | HttpWebRequest req = null; 24 | HttpWebResponse rsp = null; 25 | System.IO.Stream reqStream = null; 26 | try 27 | { 28 | req = (HttpWebRequest)WebRequest.Create(url); 29 | req.Method = method; 30 | req.KeepAlive = false; 31 | req.ProtocolVersion = HttpVersion.Version10; 32 | req.Timeout = 5000; 33 | req.ContentType = "application/x-www-form-urlencoded;charset=utf-8"; 34 | byte[] postData = Encoding.UTF8.GetBytes(BuildQuery(parameters, "utf8")); 35 | reqStream = req.GetRequestStream(); 36 | reqStream.Write(postData, 0, postData.Length); 37 | rsp = (HttpWebResponse)req.GetResponse(); 38 | Encoding encoding = Encoding.GetEncoding(rsp.CharacterSet); 39 | return GetResponseAsString(rsp, encoding); 40 | } 41 | catch (Exception ex) 42 | { 43 | return ex.Message; 44 | } 45 | finally 46 | { 47 | if (reqStream != null) reqStream.Close(); 48 | if (rsp != null) rsp.Close(); 49 | } 50 | } 51 | else 52 | { 53 | //创建请求 54 | HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url + "?" + BuildQuery(parameters, "utf8")); 55 | 56 | //GET请求 57 | request.Method = "GET"; 58 | request.ReadWriteTimeout = 5000; 59 | request.ContentType = "text/html;charset=UTF-8"; 60 | HttpWebResponse response = (HttpWebResponse)request.GetResponse(); 61 | Stream myResponseStream = response.GetResponseStream(); 62 | StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8")); 63 | 64 | //返回内容 65 | string retString = myStreamReader.ReadToEnd(); 66 | return retString; 67 | } 68 | } 69 | 70 | /// 71 | /// 组装普通文本请求参数。 72 | /// 73 | /// Key-Value形式请求参数字典 74 | /// URL编码后的请求数据 75 | static string BuildQuery(IDictionary parameters, string encode) 76 | { 77 | StringBuilder postData = new StringBuilder(); 78 | bool hasParam = false; 79 | IEnumerator> dem = parameters.GetEnumerator(); 80 | while (dem.MoveNext()) 81 | { 82 | string name = dem.Current.Key; 83 | string value = dem.Current.Value; 84 | // 忽略参数名或参数值为空的参数 85 | if (!string.IsNullOrEmpty(name))//&& !string.IsNullOrEmpty(value) 86 | { 87 | if (hasParam) 88 | { 89 | postData.Append("&"); 90 | } 91 | postData.Append(name); 92 | postData.Append("="); 93 | if (encode == "gb2312") 94 | { 95 | postData.Append(HttpUtility.UrlEncode(value, Encoding.GetEncoding("gb2312"))); 96 | } 97 | else if (encode == "utf8") 98 | { 99 | postData.Append(HttpUtility.UrlEncode(value, Encoding.UTF8)); 100 | } 101 | else 102 | { 103 | postData.Append(value); 104 | } 105 | hasParam = true; 106 | } 107 | } 108 | return postData.ToString(); 109 | } 110 | 111 | /// 112 | /// 把响应流转换为文本。 113 | /// 114 | /// 响应流对象 115 | /// 编码方式 116 | /// 响应文本 117 | static string GetResponseAsString(HttpWebResponse rsp, Encoding encoding) 118 | { 119 | System.IO.Stream stream = null; 120 | StreamReader reader = null; 121 | try 122 | { 123 | // 以字符流的方式读取HTTP响应 124 | stream = rsp.GetResponseStream(); 125 | reader = new StreamReader(stream, encoding); 126 | return reader.ReadToEnd(); 127 | } 128 | finally 129 | { 130 | // 释放资源 131 | if (reader != null) reader.Close(); 132 | if (stream != null) stream.Close(); 133 | if (rsp != null) rsp.Close(); 134 | } 135 | } 136 | } 137 | } -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.VisualBasic.Core.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 27 | 28 | <_NoWarnings Condition="'$(WarningLevel)' == '0'">true 29 | <_NoWarnings Condition="'$(WarningLevel)' == '1'">false 30 | 31 | 32 | 33 | 34 | $(IntermediateOutputPath)$(TargetName).compile.pdb 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | false 46 | 47 | 48 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | true 57 | 58 | 59 | 60 | 140 | 141 | 142 | 143 | <_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" /> 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/Microsoft.CSharp.Core.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 27 | 30 | 31 | $(NoWarn);1701;1702 32 | 33 | 34 | 35 | 36 | $(NoWarn);2008 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 48 | $(AppConfig) 49 | 50 | 51 | $(IntermediateOutputPath)$(TargetName).compile.pdb 52 | 53 | 54 | 55 | 56 | false 57 | 58 | 59 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | true 68 | 69 | 70 | 71 | 142 | 143 | 144 | 145 | 146 | <_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" /> 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/csc.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/vbc.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /Reading/Reading.Web/bin/roslyn/csi.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | --------------------------------------------------------------------------------