# Dotnet9
**Repository Path**: vmyspace189/Dotnet9
## Basic Information
- **Project Name**: Dotnet9
- **Description**: 一个使用ASP.NET Core 7.0开发的博客网站系统
- **Primary Language**: C#
- **License**: MIT
- **Default Branch**: develop
- **Homepage**: https://dotnet9.com
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 11
- **Created**: 2022-08-10
- **Last Updated**: 2022-08-10
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
Dotnet9
一个使用`ASP.NET Core MVC 7.0`开发的`博客`系统,集成了在线免费`工具`,目前正在开发中...
 

[](https://gitee.com/dotnet9/Dotnet9) [](https://github.com/dotnet9/Dotnet9) [](https://github.com/dotnet9/Dotnet9)
[English](./README.md) | 简体中文
## ✨ 1. 特性
1. 使用`ASP.NET Core MVC 7.0`开发
2. 带博客浏览功能
3. 带工具使用
## 🌈 2. 在线示例
Dotnet9:[https://dotnet9.com](https://dotnet9.com)
## 🖥 3. 支持环境
- .NET 7.0
- Visual Studio 2022
- PostgreSQL
### 3.1 项目配置
正确运行前,请先对项目进行配置,请看下面说明。
1. 配置数据库连接字符串
在`appsettings.json`中添加节点,配置MySQL连接字符串:
```json
"ConnectionStrings": {
"DefaultConnection": "Host=[host];Username=[username];Database=[database];port=[5432];password=[password];"
}
```
2. 配置博客数据
种子数据来源,在`appsettings.json`中添加节点
```json
"AssetsLocalPath": "F:\\github_gitee\\Assets.Dotnet9",
"AssetsRemotePath": "https://img1.dotnet9.com"
```
- AssetsLocalPath: 博客分类信息、专辑信息、文章信息等存放在这个目录下,需要将仓库克隆到本地:https://github.com/dotnet9/Assets.Dotnet9
- AssetsRemotePath:CDN链接,图片资源存放路径
### 3.2 数据迁移
打开程序包控制台,选择项目:`Dotnet9.EntityFrameworkCore`,执行以下命令:
```shell
Add-Migration InitDB
Update-Database
```
### 3.2 生成数据种子
以上2个步骤完成后,运行项目,访问链接`localhost:5000/seed`执行种子数据生成,此方法写在`HomeController`中
```C#
[Route("seed")]
public async Task Seed()
{
// 种子执行方法体
}
```
## 💕 支持本项目
## ☀️ License
MIT
## 最后来几张网站截图
网站文章介绍:[分享我做Dotnet9博客网站时积累的一些资料](https://dotnet9.com/2022/03/Share-some-learning-materials-I-accumulated-when-I-was-a-blog-website)

### 前台
**专辑**

**分类**

**文章详情**
