should be able to queue report using api.

This commit is contained in:
kay.one 2013-06-09 13:50:57 -07:00
commit ac3582d5c4
22 changed files with 91 additions and 270 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using Marr.Data;
using Marr.Data.Mapping;
@ -30,6 +31,13 @@ namespace NzbDrone.Core.Datastore
.SetAutoIncrement();
}
public static RelationshipBuilder<T> AutoMapChildModels<T>(this ColumnMapBuilder<T> mapBuilder)
{
return mapBuilder.Relationships.AutoMapPropertiesWhere(m =>
m.MemberType == MemberTypes.Property &&
typeof(ModelBase).IsAssignableFrom(((PropertyInfo) m).PropertyType));
}
public static bool IsMappableProperty(MemberInfo memberInfo)
{
var propertyInfo = memberInfo as PropertyInfo;