MockHttp is a testing layer for Microsoft's HttpClient library. It allows stubbed responses to be configured for matched HTTP requests and can be used to test your application's service layer.
var mockHttp = new MockHttpMessageHandler(); // Setup a respond for the user api (including a wildcard in the URL) mockHttp.When("http://localhost/api/user/*") .Respond("application/json", "{'name' : 'Test McGee'}"); // Respond with JSON // Inject the handler or client into your application code var client = mockHttp.ToHttpClient(); var response = await client.GetAsync("http://localhost/api/user/1234"); // or without async: var response = client.GetAsync("http://localhost/api/user/1234").Result; var json = await response.Content.ReadAsStringAsync(); // No network connection required Console.Write(json); // {'name' : 'Test McGee'}
A few of the customer-requested updates in Microsoft SQL Server 2014 SP1 are:
- Column store performance is improved when batch mode operators spill over to disk. A new XEvent provides insights into column store inserts.
- Several issues in buffer pool extension SSD configuration are addressed, including the ability to do instant initialization of the buffer pool extension file.
- Certain queries compile faster when using new cardinality estimator, and other cardinality estimation query plans are more efficient when using TF-4199.
- The scalability benefits of two trace flags (TF-1236, TF-9024) are applied automatically.
- Backup header information retrieval works better with encrypted backups.
ایا معمار نرم افزار هستید؟
....
Becoming a software architect isn't something that simply happens overnight or with a promotion. It's a role , not a rank . It's an evolutionary process where you'll gradually gain the experience and confidence that you need to undertake the role.
کتابخانه jquery-lockfixed
lockfixed is a jQuery plugin which allows for DOM elements to be positioned anywhere on the page, and lock within the user's viewport when scrolling. Common use case is a menu under a header, which on scrolling stays within the viewport and doesn't overflow the footer.
Degrades nicely on mobile and tablet browsers and doesn't have any CSS prerequisites. Demo
Input Validation for me is about validating the user input. Some people call "Name must not be empty" a business rule, I think about it as input validation. Business Rules validation is more complex, because a business rule for me is not "Name must not be empty", it is a definition of a state in the system that requires an action. Here is a definition of a business rule:
An order should be payed within 30 days, this duration can be extended, to a maximum of three times.
انتقال خودکار Data Annotations از مدلها به ViewModelهای ASP.NET MVC به کمک AutoMapper
public LoginProfile() { CreateMap<LoginViewModel, User>().ForAllMembers(_ => _.Ignore()); CreateMap<LoginViewModel, User>().ForMember(_ => _.UserName , __ => __.MapFrom(_ => _.UserName)); CreateMap<LoginViewModel, User>().ForMember(_ => _.PasswordHash , __ => __.MapFrom(_ => _.Password)); }
Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters ========================================================================================== LoginViewModel -> User (Destination member list) App.ViewModel.Enities.Identity.LoginViewModel -> App.DomainClasses.Entities.Identity.User (Destination member list) Unmapped properties: FirstName LastName IsSystemAccount IsBan RegisterDate LastLoginDate RowVersion City CityId // more ...