Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 Blog.Core 常见问题总结,非BUG #148

Closed
anjoy8 opened this issue Dec 30, 2020 · 10 comments
Closed

🎨 Blog.Core 常见问题总结,非BUG #148

anjoy8 opened this issue Dec 30, 2020 · 10 comments

Comments

@anjoy8
Copy link
Owner

anjoy8 commented Dec 30, 2020

⛳ 1、有任何问题,请先自行更新最新代码调试。

然后再提issue

🎈1.1、使用SqlServer作为持久化数据库

注意使用的数据库,要是新版的(SqlServer2012及以上),比如SqlServer2008就不太友好支持,也能用,或者说特定功能不太支持,比如事务,或者并发的时候出现错误。

@anjoy8
Copy link
Owner Author

anjoy8 commented Dec 30, 2020

🎵 2、使用Oracle作为持久化数据库


1、我正在使用的连接字符串格式:Data Source=127.0.0.1/ops;User ID=OPS;Password=123456;Persist Security Info=True;Connection Timeout=60;
2、注意Id是Oracle的关键字,可以修改下根实体类:RootEntity.cs(不一定需要改,根据具体错误来解决);
3、注意可能Sqlsugar的特性可能不适合,可能会出现特别的方法不支持问题,比如:ColumnDataType = "nvarchar",自行批量替换处理,改成varchar,或者直接把这个datatype删掉,用默认的即可;
4、若还不行,可能无法自动创建数据库,自己先手动创建数据库;

@anjoy8 anjoy8 pinned this issue Dec 30, 2020
@anjoy8 anjoy8 closed this as completed Jan 22, 2021
@anjoy8
Copy link
Owner Author

anjoy8 commented Mar 31, 2021

🎄3、使用MySql作为持久化数据库


MySql版本:5.7+

我正在使用的连接字符串格式:server=xxxxxx;Database=blogIdp001;Uid=root;Pwd=12346;Port=3096;Allow User Variables=True;
若是Mysql,生成的数据库字段字符集可能不是utf8的,手动修改下.
或者删掉数据库,在连接字符串后加上CharSet=UTF8mb4,重新生成数据库.

@anjoy8
Copy link
Owner Author

anjoy8 commented May 13, 2021

✨4、大量使用数据的时候,建议使用Serilog


可以使用项目自写的Helper,也可以使用Serilog,
特别是在大量使用日志的时候,建议使用:

// 这种方案也行,用的是Serilog
//SerilogServer.WriteLog("RequestIpInfoLog", new string[] { requestInfo + "," }, false); 

@zhonghy
Copy link

zhonghy commented Oct 8, 2021

使用postgresql12的时候,nvarchar类型不支持。

@Myst1615731035
Copy link

在使用VS2022作为IDE时,使用T4模板生成代码,在引用:EnvDTE 依赖时,程序集Microsoft.VisualStudio.ProjectSystem.VS.Implementation, Version=17.0.0.0会导致错误,会提示:程序集“Microsoft.VisualStudio.ProjectSystem.VS.Implementation, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”中的类型“Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Automation.OAProjectItem”未标记为可序列化

处理方案:
在 ModelAuto.ttinclude文件下,查找
image
code: EnvDTE.DTE dte = (EnvDTE.DTE)hostServiceProvider.GetService(typeof(EnvDTE.DTE));

修改为:EnvDTE.DTE dte = (EnvDTE.DTE)hostServiceProvider.GetCOMService(typeof(EnvDTE.DTE));
可以修复此错误
处理方法来源:https://qa.1r1g.com/sf/ask/2870036711/
image

@zzmmin
Copy link

zzmmin commented Jun 16, 2022

mysql 数据库不能是8.0 否则生成数据库的时候报错, 换成5.7就好了

@fromEnzo
Copy link

mysql 数据库不能是8.0 否则生成数据库的时候报错, 换成5.7就好了

请问还有更好的解决方案吗?

@Of-qinhai
Copy link

mysql 数据库不能是8.0 否则生成数据库的时候报错, 换成5.7就好了

按照你说的成功了,真开心。

@NingLiu1998
Copy link

mysql 数据库不能是8.0 否则生成数据库的时候报错, 换成5.7就好了

我就用的8.0的,生成库和表没什么问题

image

image

@Caspersure
Copy link

前端考虑下要不要换成Blazor😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants