我一直在寻找,但我还没有找到解决这个问题的方法:我想创建一个类库,该类库在名为Configuration的子目录下有一个配置文件.我希望将该类库部署到任何地方,我希望它通过了解自己的位置来查找其配置文件.
以前的尝试Assembly.GetExecutingAssembly().Location没有奏效.
它会返回临时位置,例如
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\7c00e0a3\38789d63\assembly\dl3\9c0a23ff\18fb5feb_6ac3c901
而不是期望的
bin/Configuration 路径.
所以:
有谁知道如何更改VS2008 SP1中的ReSharper配色方案?
我环顾四周,所有的帖子都在互联网指向死胡同.JeBrains曾一度告诉用户改变VS(工具|选项|字体和颜色|文本编辑器)中的颜色,但我没有看到任何Resharper项目.
谢谢.
我们准备在工作中开始一个全新的项目,没有遗留代码.我们过去确实使用过Subsonic,我们对它非常满意.但那是在Linq之前.
有没有人不得不面对同样的问题(Linq x Subsonic)?
你的决定是什么?原因是什么?
有任何见解赞赏.
大局:
我正在编写一个搜索表单,用户可以选择一个或多个条件来过滤搜索结果.其中一个标准与儿童关系有关.
我正在尝试创建一个扩展方法,Iqueryable<Parent>以便我可以将其用作"链接"的一部分.
方法签名(截至目前)是:
public static IQueryable<Parent> ContainsChild(this IQueryable<Parent> qry, int[] childrenIDs)
Run Code Online (Sandbox Code Playgroud)
父表和子表:
Parent
ParentID
Name
Description
Child
ParentID (FK)
AnotherID (from a lookup table)
Selection criteria:
int[] ids = new int[3] {1,2,3};
Run Code Online (Sandbox Code Playgroud)
用法是这样的:
var parents = repository.All() //returns Iqueryable<Parent>
public IQueryable<Parent> Search(Search seach){
if (search.Criteria1 != null){
parents = parents.FilterByFirstCriteria(search.Criteria1);
}
if (search.ChildrenIDs != null){ //ChildrenIDs is an int[] with values 1,2,3
parents = parents.ContainsChild(search.ChildrenIDs)
}
}
Run Code Online (Sandbox Code Playgroud)
我想弄清楚的是如何创建ContainsChild方法,该方法返回IQueryable<Parent>父项AnotherID在ids数组中至少有一个子节点的位置.
(我正在尝试使用EF4来完成此任务)
任何帮助完全赞赏.
linq ×2
asp.net ×1
c# ×1
color-scheme ×1
data-layers ×1
filepath ×1
path ×1
resharper ×1
subsonic ×1