gmf520 / osharp.v2 Goto Github PK
View Code? Open in Web Editor NEWosharp framework version 2.0
License: Apache License 2.0
osharp framework version 2.0
License: Apache License 2.0
SortCondition[] sort = new SortCondition[] { new SortCondition("CreatedTime", ListSortDirection.Descending) };
CreatedTime 不是强类型的,希望楼主修改成Func,这样可以写起来更方便,因为分页查询的时候都需要排序的。
类内部的一些异常信息都是中文的,哪位英文好的,请贡献一下翻译哦!
添加Readme文件,方便一目了然整个项目的作用。
添加licence文件,也是开源项目很关键的一点。
OrganizationView view = new OrganizationView(org);
List children = source.Where(m => m.TreePathIds.Length == org.TreePathIds.Length + 1
&& m.TreePath.StartsWith(m.TreePath)).ToList(); //此句有错,改为
m.TreePath.StartsWith(org.TreePath)).ToList(); //多添加几个级别的 就看出错误了
建议框架增加对WCF的支持,这样在做C/S程序的时候就方便多了~
OSharp.Utility.Extensions命名空间下的
/// <summary>
/// 是否电子邮件
/// </summary>
public static bool IsEmail(this string value)
{
const string pattern = @"^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$";
return value.IsMatch(pattern);
}
没有对中文的非法判断。
Is there a problem,The organization directory is empty now .
由于OperationResult没有类似public OperationResult() {}的空构造器,导致反序列化失败。
目前来看需要在Repository类的构造函数中添加以下代码
((DbContext)unitOfWork).Configuration.LazyLoadingEnabled = false;
是否还有更合理的做法?
namespace OSharp.Utility.Data下的SerializeHelper类ToXmlFile方法。
public bool ExistsCheck(Expression<Func<TEntity, bool>> predicate, TKey id = default(TKey))
{
TKey defaultId = default(TKey);
var entity = _dbSet.Where(predicate).Select(m => new { m.Id }).SingleOrDefault();
bool exists = id.Equals(defaultId) ? entity != null : entity != null && entity.Id.Equals(defaultId);
return exists;
}
如果TKey 是字符串的话, id就回是null, id.Equals 这句就会出错,希望能改进下
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.