AngularJS #2
بنده طبق فرمایشات شما به روش زیر عمل کردم ولی بهم کار نمیده و پارشال مورد نظر را به من نشان نمیده. میشه بگید مشکل از کجاست؟
public class PostController : Controller { ApplicationDbContext db; // GET: Post public ActionResult List() { using (db=new ApplicationDbContext()) { var query = db.Posts.ToList(); return PartialView("List",query); } } }
و کدهای ویو:
<div ng-app="postmodule"> <div ng-controller="PostController"> <ul> <li ng-repeat="item in ListOfItems"> {{item.Title}} <hr /> {{item.Text}} </li> </ul> </div> </div>
و کدهایی که در فایل _Layout.cshtml نوشته ام:
<div class="container body-content" > <script src="~/Scripts/angular.js"></script> <script src="~/Scripts/angular-route.js"></script> <script> var PostApp = angular.module('postmodule', []).config(['$routeProvider', function ($routeProvider) { $routeProvider. when('/list', { templateUrl: '/Post/List', controller: 'PostController' }); }]); PostApp.controller('PostController', function ($scope, $http, postServices) { //... $scope.ListOfItems = postServices.GetPosts() .success(function (data) { $scope.ListOfItems = data; }); //... }); PostApp.service('postServices', function ($http) { this.GetPosts = function () { return $http.get('/Post/List'); }; }); </script> <a href="#list">list post</a> <div ng-view=""></div> @RenderBody() <hr /> <footer> <p>© @DateTime.Now.Year - My ASP.NET Application</p> </footer> </div>
زبان Rust در حال از هم پاشیدن است!
While Rust has earned a dedicated following, it's not without its fair share of controversies and problems. In this video I'll talk about the negative response and backlash from the Rust community in the wake of the most recent controversy, its connections to past incidents, and give my personal thoughts.
Moq در .NET Core
Moq makes testing this piece of code a breeze. Without it, I would have had to write a whole lot of essentially throwaway code just to test this three line controller action. Probably one or two orders of magnitude more code. Clearly, this tool which I relied on heavily prior to .NET Core, remains quite a powerful weapon in my arsenal in .NET Core.
Sometimes, in order to get rapid feedback, it’s useful to throw together a prototype that has literally nothing going on in the backend, but lets the user get a sense of how the application would flow. The problem, of course, is that once users see such a thing, they can’t always tell the difference between smoke and mirrors and the real thing.
ایجاد یک api امن در asp.net core 3
TypeScript 3.4 منتشر شد
Let’s dive in and see what’s new in TypeScript 3.4!
- Faster subsequent builds with the --incremental flag
- Higher order type inference from generic functions
- Improvements for ReadonlyArray and readonly tuples
- const assertions
- Type-checking for globalThis
- Convert parameters to destructured object
- Breaking changes
کانورتور عمومی برای مقادیر در WPF
معرفی NET Standard.
With .NET Standard 2.0, we’re focusing on compatibility. In order to support .NET Standard 2.0 in .NET Core and UWP, we’ll be extending these platforms to include many more of the existing APIs. This also includes a compatibility shim that allows referencing binaries that were compiled against the .NET Framework.
این به روز رسانی در سال 2014 منتشر شدهاست و شامل موارد زیر است:
FIX: Unexpected ordering when you run ORDER BY statement on a column that contains "-" in SQL Server Compact 4.0
FIX: "ConnectionString cannot be null" when you use folder redirection with offline files
FIX: It takes longer time than flush interval to flush committed transactions in SQL Server Compact 4.0