Let’s learn all about what MVVM is through practical examples.
(more…)
Author: Jamie
-
MVVM Pattern – Model View View Model
-
Solving No Access-Control-Allow-Origin with Node js and Express
If you are receiving an error similar to XMLHttpRequest cannot load localhost:3000. No Access-Control-Allow-Origin header is present on the requested resource. Origin localhost:8888 is therefore not allowed access. This typically implies that you need to enable CORS on your Node js server that is running Express as the web server. Example code below.
-
Add Function to Prototype with Javascript
In some of my more recent posts about How to compare arrays in Javascript and Format Numbers as Currency with Javascript I have been enjoying adding them as extension methods to simplify their usage.
Honestly, I’ve always been afraid to do it because it seems “hard”. Now that I’ve done it once though, it is now becoming second nature. I really can’t believe I haven’t done this before because I absolutely love adding string extensions when I developer with C#.
Let’s take a look at some code to add a function with prototype using Javascript. In this first example I will add it to the Javascript Array Prototype:
-
JavaScript String replace()
Table of contents:
-
The specified type member is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported
This morning I was writing an Entity Framework query where I was selecting an object from a model called Invoice to a table called NetsuiteErrorLog. This previously used to be an actual relationship in my EDMX; however, I needed to do some refactoring and remove the direct foreign key from Invoice to NetsuiteErrorLog. When I did this I needed to add a new partial property that mimicked this relationship. When I did that and tried to perform my query I received the generic error:
The specified type member ‘NetsuiteErrorLog’ is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported