Skip to content

阅读《微软开源跨平台移动开发实践》的源码

Notifications You must be signed in to change notification settings

stoneflyop1/MuscleFellow

Repository files navigation

微软开源跨平台移动开发实践

阅读《微软开源跨平台移动开发实践》的源代码,参考了李争老师的源码库。其中MuscleFellow.Web中的Assets文件夹内容全部来自于李老师的源码库。

使用的技术和框架

  • asp.net core 2.0 razor pages (Microsoft.AspNetCore.All),MVC与Razor Pages的对比,以及CSRF/XSRF处理
  • 依赖注入使用autofac (Autofac, Autofac.Extensions.DependencyInjection)适配.net core的依赖注入
  • 数据库使用sqlite(Microsoft.EntityFrameworkCore.Sqlite),ORM使用泛型的Repository模式
  • 移动App使用Xamarin Forms,其中Android选择了支持Android7.0以上版本,低版本需要重新安装Xamarin.Android的Nuget包

如何使用

使用 dotnet publish发布dotnetcore程序

cd MuscleFellow.Web
dotnet publish -c Release # it'll build and publish to bin/Release/netcoreapp2.0/publish
cd bin/Release/netcoreapp2.0/publish
dotnet MuscleFellow.Web.dll # start the website

问题

  1. 虽然Razor Pages本身已经自动做了跨站攻击防御,使用Ajax请求时,还是需要添加__RequestVerificationToken

About

阅读《微软开源跨平台移动开发实践》的源码

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages