Giter Site home page Giter Site logo

csharpwebapi's Introduction

CSharpWebAPI

C# 课程作业4 - WebAPI

作业要求

仿照视频自制一个 WebAPI 服务

功能描述

简单的评论和删除评论功能,邮箱用来显示 Gravatar,附带一个简陋简洁的前端实现(

运行截图

简单的评论API

响应式设计

顺带一提,MVVM框架用的是 Vue 而非视频中的 Knockout,Knockout 绑定 vm 对象用的是 with(){} 语句……要什么 IE6 兼容,avalon 兼容 IE8 我都嫌 vbs 实现双向绑定太奇技淫巧(而且有奇怪的bug)不想用(

附录:遇到的问题及解决方法

  1. new HttpResponseMessage<T>(...) 被弃用,改用 Request.CreateResponse<T>(...)
  2. Ninject 在新版本中遇到的问题,解决方法见 NinjectDependencyResolver
  3. System.Web.HttpSystem.Net.Http.Formatting中各有一个 HttpRequestMessageExtensions 类,使用extern alias 解决(见此处
  4. JsonObject 格式化报错,使用 JsonMediaTypeFormatter
  5. 这个问题是传到 Github 后发现的:Github 告诉我自带的 bootstrap 有 XSS 风险,需要更新,感谢 Github

其中extern alias的问题用户体验不是很好,VS 给出了错误原因但没有任何解决方法提示,还好 stackoverflow 捞了一手(

csharpwebapi's People

Contributors

8qwe24657913 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.