Browse Source

Attribute Bug

pull/12/MERGE
sunkaixuan 8 years ago
parent
commit
c59731f59e
  1. 2
      SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs
  2. 12
      SqlSugar/Common/CommonExtensions.cs
  3. 22
      SqlSugar/ExpressionsToSql/Method/SqlFunc.cs
  4. 1
      SqlSugar/Realization/SqlServer/DbMaintenance/SqlServerDbMaintenance.cs
  5. 1
      SqlSugar/SqlSugar.csproj

2
SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs

@ -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;

12
SqlSugar/Common/CommonExtensions.cs

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

22
SqlSugar/ExpressionsToSql/Method/SqlFunc.cs

@ -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(); }

1
SqlSugar/Realization/SqlServer/DbMaintenance/SqlServerDbMaintenance.cs

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

1
SqlSugar/SqlSugar.csproj

@ -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" />

Loading…
Cancel
Save