超高清 ASP.NET Core 2.0 MVC Razor Pages

所需积分/C币:23 2018-09-25 03:19:17 10.99MB PDF
收藏 收藏
举报

ASP.NET Core 2.0 MVC Razor Pages
ASP. NET Core 2.0 MVC& Razor Pages for beginners How Does middleware work? 27 App| lication builder…........….….….28 Handling Exceptions…… 30 Serving Up Static Files 33 Setting Up ASP. NET MVC. 34 Summary… 37 3. MVC Controllers∴39 Routing 40 Convention-Based routing…… 41 Implement routing................................ 41 Adding another Controller…,,………42 Attribute routing 43 aCtion result 47 Implementing ContentResult 47 Using a model class and objectresult ∴48 Introduction to views∴.…50 A View with a Data Collection 52 Adding a Data Service 54 Summary………………………….59 4. Models∴61 View Model Example… 62 Changing the Folder Structure 62 Adding the view Model Using the view model… ∴63 Adding a details View 64 Adding a create view ..:a::.::.:.::::::::·::a::.: 69 Refactoring the application 70 ASP. NET Core 2.0 MVC& Razor Pages for Beginners AddingthehttpgetcreateActionandthecreateview...........................72 Adding the videoeditviewModel class.................................75 Adding the httP post create Action 76 Data Annotations 81 Preparing the Create view for Validation…… 82 Adding validation to the create view.……………………………………82 Validating the model on the server………………………………283 Adding data annotations in the video entity and videoeditview Model class 84 Summary 87 5. Entity framework∴….89 Adding the videodb Context Class………………89 Configuration in the startup Class 91 Adding the Initial Migration and creating the database 93 Adding the sqlvideoData Service Component.……,…,…,………………………95 mplementing the Sqlvideo Data Service Component Class……………………95 Summary……,…,…,…,…,…,…,…,…,……………………99 6. Razor views 101 LayoutⅥiewS ∴101 Adding the layout view 102 Altering the Content Views .....................................................................102 The view start file∴ 106 The view| mports file∴… ,107 Tag Helpers...........,.,..,.,….……,108 Altering the Index view ·看 109 Adding an edit view and its actions.,,,,…,…,………………111 Refactoring the iVideoData Service Partia|VⅰeWs ,117 ASP. NET Core 2.0 MVC& Razor Pages for beginners View Components 120 Adding a view Component for the IMessage Service service……………….120 Summary 123 7. Forms authentⅰcatⅰon 125 Adding the authorize and alow anonymous Attributes…,,…,,,,…,,126 Configuring the identity Framework………….…….….…….……….127 Creating the aspNet ldentity database Tables………,…,129 User Registration…… 130 Login and Logout ∴137 Adding the Login Partial View.........…….………137 Adding the logout action.………………………140 Adding the Login View Model Class 141 AddingthehttpGetLoginAction 142 Adding the Http Post login Action 142 Ing the login view∴………………………………… 144 Summary.…………….…………….……………….……………….147 8. Front -End frameworks 149 stalling Bower and the frameworks…… 149 Styling with Bootstrap.....,.,…,.,,…,….,……….152 Adding a navigation bar….....,.……,…,………………………153 Styling the Index view 155 Adding Client-Side validation 157 Summary……………………………………………159 Part 2: Mvc how to build a video course website w www 161 9. the Use Case 163 Introduction∴…163 The Use case 163 ASP. NET Core 2.0 MVC& Razor Pages for beginners The User Interface(MVC)..…………………164 Login and register User.....,.,.,.,.,.,….,…………164 The administrator Interface(Razor pages) 165 Conclusion 165 Login and register…......,..,….…,….……………,165 TheUserdashboardviewwwwwwwwwwwwwwwwww.166 The course view 167 The video vⅰeW 168 The Administrator Dashboard Razor Page 169 A Typical Administrator Index Razor page.................. 170 A Typica| Administrator Create Razor Page....,.,,……,…………,171 A Typical Administrator Edit Razor page 172 A Typical Administrator Delete Razor Page ∴173 10. Setting up the solution…….175 Introduction 看D看D· .175 Technologies Used in This Chapter....….…..….…….,175 Overview 175 eating the solutio 175 stalling AutoMapper…..,.,.,,….,…,…,…,…,……,…………………,178 Creating the Database..........................................179 Adding the database project 180 Adding the User Class 180 Adding the database context........ :··:.::..:::::::.:::.::..:::::::非 ,180 Summa 183 11. Login 185 Introduction………185 Technologies Used in This Chapt 185 ASP. NET Core 2.0 MVC& Razor Pages for beginners Redirecting to the login view 185 Styling the login view…….....…...….…..…………187 Adding the login. css Stylesheet..……………………………188 Changing the layout of the Login view.…… 189 Styling the Login view……..….….….…….……,……,………,……………,193 Summary.…………………..….………………………195 12. Register User 197 Introduction 197 Technologies Used in This Chapt 197 Overview Changing the layout of the register View ........................................................198 Styling the register viet 200 Changing the register Action 202 Testing the registration Form..,…,…,……………………202 Summary………………………………………204 13. Modifying the Navigation Bar……..…….…,….………,……………………………205 introductⅰon 205 Technologies Used in This Chapter 205 Overview.…….205 Styling the Navigation Bar…...,.,.,.,…,.,…,…,…,…,…,………………,206 Remove the register and login links 208 Add the drop-Down Menu 208 Style the drop- Down menu......………………………210 Summa …………211 14. Data transfer objects 213 Introduction……………213 Technologies Used in This Chapter 213 ASP. NET Core 2.0 MVC& Razor Pages for beginners Overview.w.www.NNNNN213 The dtos………213 Adding the dtos 218 The view models 221 Adding the view Models.................... 222 Summary.…………………………………………223 15. Entity Classes….…......,.....,225 Introduction 225 Technologies Used in This Chapter. 225 Overview.…225 The entities…225 The video entity 225 The download Entity… 226 The Instructor Entity…………………227 The Course entity……………228 The module Entity………………………………228 The User Course Entity 229 Adding the entity classes 230 Summary………………………………………………………,233 16. Mock Data Repository…,.,,,,,….,…,…,…,…………235 Introduction 235 Technologies Used in This Chapter. 235 Overview.wwwwwwwwwwwwwwwwwwwwwwwww..w235 Add the ireadrepository Interface and mock Read Repository class 235 Add data to the mock read repository class 236 The course list :·::::...::.:::::aa::a::..:..::::::a ∴236 The userCourses list 237 ASP. NET Core 2.0 MVC& Razor Pages for beginners The modules list. .....................................................................................................237 The downloads list 237 The Instructors list 238 The videos list 238 The getCourses method ............................................................................................239 Testing the get Courses method . ............................................................................240 Thegetcoursemethod.wwwwwwwwwwwwww..241 Testing the Get Course method 243 The getVideo method 243 Testing the getvideo method......,,…,…,,…,,,…,…,………244 The getvideos method...………245 Testing the getvideos Method .247 Summary… 248 17. The membership Controller and Auto Mapper......……….249 Introduction.….249 Technologies Used in This Chapter…………….249 Overview 249 Adding the membership Controller 250 Adding the controller…....,…,……,…,…,……,……………………250 Configuring AutoMapper.……….…….……….….……………………………,253 Implementing the Action Methods 255 The dashboard action method 255 The Course action method 259 The video action method ∴262 Summary………… 268 18 the dashboard view wwwwwwwwwwwww 2 69 Introduction 269 ASP. NET Core 2.0 MVC& Razor Pages for beginners Technologies Used in This Chapter..................................269 Overview..w..wwww..wwwwnwwoowwnwnnonwwwn269 Implementing the dashboard view ,270 Adding the dashboard View 270 Iterating Over the courses in the dashboard view......................... 272 Creating the CoursePanelPartial Partial view…...….…….……………274 Styling the dashboard view and the_ CoursePanelPartial partial view…………,277 Summary 280 19. The course vⅰeW. 281 Introduction.….281 Technologies Used in This Chapter…………,…,…,…,…,…,…,…,…,,…,…,…,281 Overview 281 Adding the Course view 282 Adding the back to Dashboard Button……………………284 Adding the course. css Style Sheet .285 Adding the course Information to the view…………………………,286 Styling the course Information Section 288 Adding Columns for the Modules and the Instructor Bio 289 Adding the modules.........,……,…………290 Adding the videos… 291 Styling the Module videos Partial view…… 295 Adding the downloads...... .297 Styling the Module DownloadsPartial View.……300 Adding the Instructor Bio...........,.,,…… 301 Styling the Instructor BioPartial Partial view ∴303 Summary.……………………,……………………303 20. The video view 305

...展开详情
试读 127P 超高清 ASP.NET Core 2.0 MVC Razor Pages
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    抢沙发
    一个资源只可评论一次,评论内容不能少于5个字
    img

    关注 私信 TA的资源

    上传资源赚积分,得勋章
    最新推荐
    超高清 ASP.NET Core 2.0 MVC Razor Pages 23积分/C币 立即下载
    1/127
    超高清 ASP.NET Core 2.0 MVC Razor Pages第1页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第2页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第3页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第4页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第5页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第6页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第7页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第8页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第9页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第10页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第11页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第12页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第13页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第14页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第15页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第16页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第17页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第18页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第19页
    超高清 ASP.NET Core 2.0 MVC Razor Pages第20页

    试读已结束,剩余107页未读...

    23积分/C币 立即下载 >