Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/NJsonApiCore.Web.MVCCore.HelloWorld/Models/Person.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{
public class Person
{
public Person()
{
}

public Person(string firstname, string lastname, string twitter)
{
Id = StaticPersistentStore.GetNextId();
Expand Down
6 changes: 6 additions & 0 deletions src/NJsonApiCore/ResourceMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,14 @@ public Dictionary<string, object> GetAttributes(object objectGraph)
// TODO ROLA - type handling must be better in here
public Dictionary<string, object> GetValuesFromAttributes(Dictionary<string, object> attributes)
{

var values = new Dictionary<string, object>();

if (attributes == null)
{
return values;
}

foreach (var propertySetter in PropertySettersExpressions)
{
object value;
Expand Down