Skip to main content

Posts

Showing posts with the label access mvc 5 web api 2

61 Best MVC Questions and Answers - ASP.Net C#

61 Best AP.NET MVC Questions and Answers What Is MVC (Model View Controller)? What is MVC Process Request Life Cycle? 55 Best Difference Between MVC 2, MVC 3, MVC 4, MVC 5 and MVC 6 What's New In MVC 4? What's New In MVC 5? What's New In MVC 6? What Is vNext Architecture? What Are the benefits of using MVC? What Are different return types of a controller action method in MVC? What Are Filters in MVC? Where the Routing rules are defined in an ASP.Net MVC Application? What Is Routing? What Is Attribute based Routing? What Is the difference between Tempdata, ViewData, and ViewBag? What Are Advantages and Disadvantages of MVC model? What Is the difference between View and ...

JSON.Net Self referencing loop detected

The fixes, Ignoring circular reference globally . You can make the default  behavior  with the help of Json-Serializer-Settings and  add below code in Application_Start(). JsonConvert .DefaultSettings = () => new JsonSerializerSettings {     Formatting = Newtonsoft.Json. Formatting .Indented,     ReferenceLoopHandling = Newtonsoft.Json . ReferenceLoopHandling .Ignore  }; Here is some limitations for the same as given below. 1.        Sometime  we  loses data by looping reference information. 2.        Fixes is only applies to JSON.net. 3.        If there is a deep reference chain that  we cannot be controlled to level of references. Example code as given below. namespace demo_example {     public class MvcApplication : System.Web. HttpApplication     { ...

MongoDB vs. SQL Server

The MongoDB  store the data in documents with JSON format but SQL store the data in Table format. The MongoDB provides high performance, high availability, easy scalability etc.  rather than SQL Server. MongoDB mentioned to document-based NoSQL databases but SQL Server mentioned to relational database. MongoDB is a NoSQL  database so there's nothing like a stored procedure. You can create a set of common functionality in a class library. The "fire-and-forget"  is a default option to check query operations but we can use to " getLastError " method to check query operations succeeded or not. In the MongoDB, we can change the structure simply by adding, removing column from the existing documents. For SQL Server to MongoDB mapping chart, go to live link https://docs.mongodb.org/manual/reference/sql-comparison/     For more detail, go to below link. http://stackoverflow.com/questions/13190468/pros-and-cons-of-using-mongodb-inste...