Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrailsford committed Jan 17, 2018
2 parents 2f9396e + 4377b4b commit 3cd6d0b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,6 @@ build/_umbraco

applicationhost.config
*.Matt.sln
*.TestHarness
*.TestHarness

.vs/
12 changes: 11 additions & 1 deletion src/Fluidity/Data/FluidityRepository`T.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,17 @@ public virtual long GetTotalRecordCount(bool fireEvents = true)

object IFluidityRepository.Get(object id, bool fireEvents)
{
return Get((TId)TypeDescriptor.GetConverter(typeof(TId)).ConvertFrom(id), fireEvents);
// Check if the specified Identifier type is the same type as the "id" arguement.
// If it is, then we don't need to convert this value.
// Otherwise, we will need to convert the "id" to the specified type.
if(typeof(TId) == id.GetType())
{
return Get((TId)id, fireEvents);
}
else
{
return Get((TId)TypeDescriptor.GetConverter(typeof(TId)).ConvertFrom(id), fireEvents);
}
}

IEnumerable<object> IFluidityRepository.GetAll(bool fireEvents)
Expand Down
8 changes: 4 additions & 4 deletions src/Fluidity/Fluidity.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@
REM # Copy files
REM #################################################

IF %25ComputerName%25 == MBP13-PC-BC (
IF %25ComputerName%25 == DESKTOP-ESFKU58 (
IF NOT "$(SolutionDir)" == "*Undefined*" (
REM xcopy /s /y "$(TargetPath)" "$(SolutionDir)Fluidity.TestHarness\bin"
REM xcopy /s /y "$(TargetDir)Fluidity.pdb" "$(SolutionDir)Fluidity.TestHarness\bin"
xcopy /s /y "$(ProjectDir)Web\UI\*" "$(SolutionDir)Fluidity.TestHarness"
xcopy /s /y "$(TargetPath)" "C:\Users\Matt\Storage\Sandbox\Umbraco\FluidityDemo\FluidityDemo\bin"
xcopy /s /y "$(TargetDir)Fluidity.pdb" "C:\Users\Matt\Storage\Sandbox\Umbraco\FluidityDemo\FluidityDemo\bin"
xcopy /s /y "$(ProjectDir)Web\UI\*" "C:\Users\Matt\Storage\Sandbox\Umbraco\FluidityDemo\FluidityDemo"
)
)</PostBuildEvent>
</PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/Fluidity/Web/Models/FluidityEntityBasicModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// </copyright>

using System.Runtime.Serialization;
using Fluidity.Extensions;

namespace Fluidity.Web.Models
{
Expand All @@ -13,6 +14,9 @@ public class FluidityEntityBasicModel
[DataMember(Name = "id", IsRequired = true)]
public object Id { get; set; }

[DataMember(Name = "key")]
public object Key => Id?.EncodeAsGuid();

// Currently hard coding parent id as nuPickers requires passing
// a parent id into it's functions even though it may not be used.
[DataMember(Name = "parentId")]
Expand Down

0 comments on commit 3cd6d0b

Please sign in to comment.