.net-assembly

SQLCLR custom aggregate with multiple parameters

穿精又带淫゛_ 提交于 2019-12-02 17:16:27
问题 I have trouble understanding of how CLR User-Defined Aggregates work. I have to create some custom CLR aggregates with multiple parameters. The point is to get the value of the first parameter depending on the second. For example, I have the following values in my table, and I need the oldest employee Name for each Type : Type | Name | Age -------------------------------- Manager | emp 1 | 35 Manager | emp 2 | 42 Developer | emp 3 | 36 Developer | emp 4 | 45 Developer | emp 5 | 22 So I would

Are to many assemblies bad?

左心房为你撑大大i 提交于 2019-12-02 13:13:47
问题 I've one little question. In many software architectures, for example multi tier or something like the enterprise library, I expand some code in external assemblies. Sometimes my project includes more then 20 assemblies per solution. Now I'm confused... Are 20 assemblies to much? If yes, what I can do in a large project with different "sections" of logic? If i implement the enterprise library, I normaly have 5 assemblies minimally. 回答1: Twenty assemblies is a long, long way from a problem.

Using 2 different versions of EF in the same Project

蓝咒 提交于 2019-12-02 11:48:47
问题 In my current Project i have two Project References that are DataContexts. One is for accessing an Oracle Db and is using EF 4.2. The other is accessing a SQL Server and uses EF 6.0. I already read this solution, but i can't get it to work. Here is what i got: I referenced EF 6.0. In a Pre-build command i xcopied both dlls in seperate folders In my Appconfig i added this: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name=

Create application domain and load assembly

丶灬走出姿态 提交于 2019-12-02 09:34:53
I want to create an application domain with default permissions and load assembly into the application domain with default privileges and execute the methods inside the assembly. You may take a look at the following article on MSDN. Or if you want to construct an instance of some type inside another AppDomain (assuming this type has a default constructor): var domain = AppDomain.CreateDomain("NewAppDomain"); var path = @"C:\work\SomeAssembly.dll"; var t = typeof(SomeType); var instance = (SomeType)domain.CreateInstanceFromAndUnwrap(path, t.FullName); The instance variable returned with this

SQLCLR custom aggregate with multiple parameters

十年热恋 提交于 2019-12-02 08:31:16
I have trouble understanding of how CLR User-Defined Aggregates work. I have to create some custom CLR aggregates with multiple parameters. The point is to get the value of the first parameter depending on the second. For example, I have the following values in my table, and I need the oldest employee Name for each Type : Type | Name | Age -------------------------------- Manager | emp 1 | 35 Manager | emp 2 | 42 Developer | emp 3 | 36 Developer | emp 4 | 45 Developer | emp 5 | 22 So I would like to write a query like this to get the result by using my assembly: Select Type, dbo

Oracle.DataAccess.dll not shown in explorer although it is installed in GAC

ε祈祈猫儿з 提交于 2019-12-02 07:59:46
Does anybody know why my Oracle.DataAccess.dll Version 4 assemblies are not shown in explorer view. It is installed in GAC and working without any problems. gacutil shows it as expected. C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>gacutil /l Oracle Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.18020 Copyright (c) Microsoft Corporation. All rights reserved. The Global Assembly Cache contains the following assemblies: Number of items = 0 C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>gacutil /l Oracle.DataAccess Microsoft (R) .NET Global Assembly Cache

Are to many assemblies bad?

こ雲淡風輕ζ 提交于 2019-12-02 07:22:16
I've one little question. In many software architectures, for example multi tier or something like the enterprise library, I expand some code in external assemblies. Sometimes my project includes more then 20 assemblies per solution. Now I'm confused... Are 20 assemblies to much? If yes, what I can do in a large project with different "sections" of logic? If i implement the enterprise library, I normaly have 5 assemblies minimally. Twenty assemblies is a long, long way from a problem. Just for comparison, when I look at Visual Studio right now, I see it having 249 assemblies loaded. Nothing

.NET DLL dependency of same file

倖福魔咒の 提交于 2019-12-02 07:21:14
问题 I upgraded one of our websites and were greated by this error: === Pre-bind state information === LOG: User = NT AUTHORITY\NETWORK SERVICE LOG: DisplayName = <assembly>, Version=2.0.42.64, Culture=neutral, PublicKeyToken=c445f6f924945bd1 (Fully-specified) LOG: Appbase = file:///E:/Web/ LOG: Initial PrivatePath = E:\Web\bin Calling assembly : <assembly>, Version=2.0.42.67, Culture=neutral, PublicKeyToken=c445f6f924945bd1. === LOG: This bind starts in default load context. LOG: Using

SQLCLR custom aggregate with multiple sql_variant parameters

安稳与你 提交于 2019-12-02 04:33:07
Hy, I have post a question about CLR User-Defined Aggregates few month ago oon this post . This works like a charm. But now I would like to quite the same functions with the two parameters in sql_variant type. Like in my previous post, the two function would be sMax and sMin and will return the first value depending on the second. I found that the sql_variant type is a object type in C#. But I having difficulties to accumulate and compare the object. What is the best option to compare this two object without knowing the type? When using SQL_VARIANT / object , you can determine the type by

How do I pull DotNetOpenAuth assembly references into unit test project for ASP.NET MVC4 solution?

旧街凉风 提交于 2019-12-02 03:55:20
Tl;dr version: I am stuck with the exception: System.IO.FileLoadException : Could not load file or assembly 'DotNetOpenAuth.AspNet, Version 4. 0 .0.0 ... A bit dismayed that msft used so many static classes and methods for auth in the new MVC4 project template. Want to wrap all membership/auth functionality into a class that implements an interface so that I can mock for unit tests. After a couple of evenings of struggling, I have decided to start from scratch, so I removed all DotNetOpenAuth* assembly references and nuget package.config references. I have similarly removed all references to