abp默认管理员:admin,密码:123qwe,这是写死的,xxx.Core\Authorization\Users\User.cs 行数:10
1.先在Core项目中创建模型
Models》Model.cs/ModelManager.cshtml
2.在Application中创建接口和具体类:
IModelAppService.cs
ModelAppService.cs
创建Dto和QueryInput类
ModelDto/ModelQueryInputgit
3.在EntityFramework的DbContext.cs类中,注册数据表,而后执行对应的migration命令更新数据库github
查看全部接口web
http://localhost:6234/api/AbpServiceProxies/GetAll?type=angularsql
swagger:http://localhost:6234/apis/index数据库
多数据库:api
abp框架多数据库:
A56.WMS.EntityFramework中:
增长:对应的 DbContext.cs
增长:对应的 /EntityFramework/Repositories/DbRepositoryBase.cs
增长:对应的 Migrations文件夹,在文件夹里增长 Configuration.cs框架
4.邮件发送:async
xxx.EntityFramework项目中:Migrations/SeedData/DefaultSettingsCreator.cs中配置邮件服务:spa
public void Create() { #region Emailing string mail_smtp = ConfigurationManager.AppSettings["mail_smtp"]; string mail_main = ConfigurationManager.AppSettings["mail_main"]; string mail_pwd = ConfigurationManager.AppSettings["mail_pwd"]; string mail_port = ConfigurationManager.AppSettings["mail_port"]; string mail_ssl = ConfigurationManager.AppSettings["mail_ssl"]; string mail_name = ConfigurationManager.AppSettings["mail_name"]; AddSettingIfNotExists(EmailSettingNames.DefaultFromAddress, mail_main); AddSettingIfNotExists(EmailSettingNames.DefaultFromDisplayName, mail_name); AddSettingIfNotExists(EmailSettingNames.Smtp.Port, mail_port); AddSettingIfNotExists(EmailSettingNames.Smtp.Host, mail_smtp); AddSettingIfNotExists(EmailSettingNames.Smtp.UserName, mail_main); AddSettingIfNotExists(EmailSettingNames.Smtp.Password, mail_pwd); AddSettingIfNotExists(EmailSettingNames.Smtp.Domain, ""); AddSettingIfNotExists(EmailSettingNames.Smtp.EnableSsl, mail_ssl); AddSettingIfNotExists(EmailSettingNames.Smtp.UseDefaultCredentials, "false"); #endregion //Languages AddSettingIfNotExists(LocalizationSettingNames.DefaultLanguage, "en"); }
而后 程序包管理器控制台 执行:update-database
nuget安装:AbpMailKit,而后在xxx.Core中找到 xxxCoreModule.cs
[DependsOn(typeof(AbpMailKitModule))] public class xxxCoreModule : AbpModule{}
一切ok,而后就是调用了,注意调用发送邮件的时候若是是多租户的话,记得设置请求的Header信息》 Authorization bearer ticket
public class TaskManager : IDomainService { private readonly IEmailSender _emailSender; public TaskManager( IEmailSender emailSender, ISmtpEmailSenderConfiguration smtpEmialSenderConfigtion ) { _emailSender = emailSender; } /// <summary> /// 发送邮件 /// </summary> /// <param name="emailAddress">目标邮箱</param> /// <param name="subject">邮件标题</param> /// <param name="body">邮件内容</param> public async void SendMail(string emailAddress, string subject, string body) { await _emailSender.SendAsync( to: emailAddress, subject: subject, body: body, isBodyHtml: true ); } }
https://www.cnblogs.com/LmuQuan/p/9122143.html
http://www.cnblogs.com/farb/p/ModuleZeroContent.html
http://www.cnblogs.com/farb/p/4849791.html
http://www.cnblogs.com/farb/p/modulezeroInstall.html
http://www.mamicode.com/info-detail-2320070.html
http://www.bubuko.com/infodetail-2594809.html
http://www.cnblogs.com/1zhk/p/5456389.html
https://www.cnblogs.com/farb/p/moduleZeroUserManagement.html
http://www.cnblogs.com/mienreal/p/4687789.html
AbpSession管理:http://www.cnblogs.com/mienreal/p/4561235.html
自定义过滤器:http://www.cnblogs.com/farb/p/ABPDataFilters.html
邮件文件:http://zhaokuohaha.github.io/2016/09/06/abp%E9%82%AE%E4%BB%B6/
https://www.cnblogs.com/Wddpct/p/5919507.html
ABP框架使用Mysql:
https://github.com/ABPFrameWorkGroup/AbpDocument2Chinese/blob/master/Markdown/Abp/9.4ABP%E5%9F%BA%E7%A1%80%E8%AE%BE%E6%96%BD%E5%B1%82-%E9%9B%86%E6%88%90EntityFrameworkMySql.md
https://www.cnblogs.com/ixysy/p/6219719.html
添加左侧菜单:https://blog.csdn.net/ysj1163620987/article/details/54909635ABP入门系列(16)——经过webapi与系统进行交互:https://www.jianshu.com/p/d14733432dc2