Attribute Bug

This commit is contained in:
sunkaixuan 2017-06-07 19:11:39 +08:00
parent 6f68a92950
commit c59731f59e
5 changed files with 15 additions and 23 deletions

View File

@ -96,7 +96,7 @@ namespace SqlSugar
string fileName = propertyInfo.Name;
if (mappingColumns != null)
{
var mappInfo = mappingColumns.SingleOrDefault(it => it.EntityName.Equals(propertyInfo.Name));
var mappInfo = mappingColumns.SingleOrDefault(it => it.EntityName==type.Name&&it.PropertyName.Equals(propertyInfo.Name));
if (mappInfo != null)
{
fileName = mappInfo.DbColumnName;

View File

@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SqlSugar
{
public static class CommonExtensions
{
}
}

View File

@ -8,24 +8,30 @@ namespace SqlSugar
{
public class SqlFunc
{
public static bool HasNumber(object thisValue) { throw new NotImplementedException(); }
public static bool HasValue(object thisValue){ throw new NotImplementedException(); }
public static bool HasNumber(object thisValue)
{
return thisValue.ObjToInt() > 0;
}
public static bool HasValue(object thisValue)
{
return thisValue.IsValuable();
}
public static bool IsNullOrEmpty(object thisValue) { throw new NotImplementedException(); }
public static string ToLower(object thisValue) { throw new NotImplementedException(); }
public static string ToUpper(object thisValue) { throw new NotImplementedException(); }
public static string Trim(object thisValue) { throw new NotImplementedException(); }
public static bool Contains(string thisValue, string parameterValue) { throw new NotImplementedException();}
public static bool ContainsArray<T>(T [] thisValue, object parameterValue) { throw new NotImplementedException(); }
public static bool Contains(string thisValue, string parameterValue) { throw new NotImplementedException(); }
public static bool ContainsArray<T>(T[] thisValue, object parameterValue) { throw new NotImplementedException(); }
public static bool StartsWith(object thisValue, string parameterValue) { throw new NotImplementedException(); }
public static bool EndsWith(object thisValue, string parameterValue) { throw new NotImplementedException(); }
public new static bool Equals(object thisValue, object parameterValue) { throw new NotImplementedException(); }
public static bool DateIsSame(DateTime date1, DateTime date2) { throw new NotImplementedException();}
public static bool DateIsSame(DateTime date1, DateTime date2) { throw new NotImplementedException(); }
public static bool DateIsSame(DateTime? date1, DateTime? date2) { throw new NotImplementedException(); }
public static bool DateIsSame(DateTime date1, DateTime date2, DateType dataType) { throw new NotImplementedException(); }
public static bool DateIsSame(DateTime date1, DateTime date2, DateType dataType) { throw new NotImplementedException(); }
public static DateTime DateAdd(DateTime date, int addValue, DateType dataType) { throw new NotImplementedException(); }
public static DateTime DateAdd(DateTime date, int addValue) { throw new NotImplementedException(); }
public static int DateValue(DateTime date, DateType dataType) { throw new NotImplementedException(); }
public static bool Between(object value, object start, object end){ throw new NotImplementedException();}
public static bool Between(object value, object start, object end) { throw new NotImplementedException(); }
public static int ToInt32(object value) { throw new NotImplementedException(); }
public static long ToInt64(object value) { throw new NotImplementedException(); }
public static DateTime ToDate(object value) { throw new NotImplementedException(); }
@ -35,7 +41,7 @@ namespace SqlSugar
public static double ToDouble(object value) { throw new NotImplementedException(); }
public static bool ToBool(object value) { throw new NotImplementedException(); }
public static string Substring(object value, int index, int length) { throw new NotImplementedException(); }
public static string Replace(object value,string oldChar, string newChar) { throw new NotImplementedException(); }
public static string Replace(object value, string oldChar, string newChar) { throw new NotImplementedException(); }
public static int Length(object value) { throw new NotImplementedException(); }
public static TResult AggregateSum<TResult>(TResult thisValue) { throw new NotImplementedException(); }
public static TResult AggregateAvg<TResult>(TResult thisValue) { throw new NotImplementedException(); }

View File

@ -88,7 +88,6 @@ namespace SqlSugar
return "ALERT TABLE {0} ALTER COLUMN {1}{2} {3} ";
}
}
protected override string BackupDataBaseSql
{
get

View File

@ -95,7 +95,6 @@
<Compile Include="Abstract\SqlBuilderProvider\SqlBuilderProvider.cs" />
<Compile Include="Common\CacheManager.cs" />
<Compile Include="Common\Check.cs" />
<Compile Include="Common\CommonExtensions.cs" />
<Compile Include="Common\DbExtensions.cs" />
<Compile Include="Common\ErrorMessage.cs" />
<Compile Include="Common\IsWhatExtensions.cs" />