» Home » Type » Page 1
Is this a bug? : I get “ The type … is not a complex type or an entity type” in my WCF data service using the Reflection provider
by Kubla Khan in Programming Languages

When invoking a query on the data service I get this error message inside the XML feed:


<m:error>
<m:code></m:code>
<m:message xml:lang="nl-NL">Internal Server Error. The type 'MyType' is not a complex type or an entity type.</m:message>
</m:error>

When I use the example described here in the art


Casting generic to interface type - Unable to cast object of type 'System.RuntimeType' to type
by Silverforce11 in Programming Languages

I have some classes like this:


public class Customer
{ }
public interface IRepository
{ }
public class Repository<T> : IRepository
{ }
public class CustomerRepository<Customer>
{ }

Then, as per the answer to this question I can use reflection to get a list of types referenced by generics for each of my *Reposito


How to add multiple generic type constraints for a type parameter in VS 2010 UML Class Diagram parameterized type?
by Steven Weber in Programming Languages
namespace ConsoleApplication8
{
public class Foo<T>
where T : IFoo, IFoo2
{
public Foo(T fooThing)
{
}
}
public interface IFoo
{
string Name {get;}
}
public interface IFoo2
{
string Name2 {get;}
}
}


Avoiding “Target type 'type name' is not convertible to base type System.String”
by krs in Programming Languages

I am using ReSharper 6.1.1 and having the solution wide analysis enabled in my project shows up with an error:


Target type 'CustomControls.XSButton' is not convertible to base type System.String


The code compiles and runs fine since a built in TypeConverter in WPF takes care of this, shortly described in a ReSharper bug report.


Note that the XSButton<


Compile Error: Cannot implicitly convert type to type, random characters added to name of one type (WCF)
by lockdown571 in Development Tools & Services

I have a project using WCF which was working fine, but I moved the code to another machine and now it will not compile. I get errors for lines of code like this, where I instantiate a class and then call a service client:


FlooringReportingServiceClient.FlooringReportingServiceClient client = new FlooringReportingServiceClient.FlooringReportingServiceClient();
BusinessCollec

App Engine 1.7.5 “TypeError: <type 'str'> has type <type 'str'>, but expected one of: int, long, bool”
by nobodyzzz in Web Design

I am getting the following stack trace in production on AppEngine 1.7.5 when sending .put() to an NDB object. The code works fine in a local development instance. Has anyone else experienced this?


File "/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/model.py", line 3187, in _put
return self._put_async(**ctx_options).get_result()
File "/python27_


Getting a Method may only be called on a Type for which Type.IsGenericParameter is true. On a overload type in my ViewModel
by wraith in Programming Languages

Here is the Property in the Base Class


[ReadOnly(true), Display(GroupName = "Payment Details")]
public virtual GridViewModel<PaymentDetails> Details { get; set; }

Here is the Property in the Inherited Class


[Display(AutoGenerateField = false, AutoGenerateFilter = false), ScaffoldColumn(false)]
public override GridViewModel&l

Scala: contravariant type A occurs in covariant position in type >: A <: Any of type B
by Piriya in Programming Languages

The compiler is telling me this can't be with a warning of: "contravariant type A occurs in covariant position in type >: A <: Any of type B." The warning is in the type parameter of the compose method. Logically the type definition makes sense to me. If the compiler has no qualms with andThen, why the problem with the converse?


trait Foo[-A]{
def compose[B >: A](t:

How to force function parameter to be the same type and not allow using the type constructor to match the given type?
by kharakawa in Programming Languages

I was a bit surprised finding out this feature in C++, and I didn't expect it to happen.


Here is the code:


struct XY {
int x,y;
XY(int v) : x(v), y(v) {}
};
bool test1(const XY &pos){
return pos.x < pos.y;
}
bool test1(int x, int y){
return x < y;
}
void functest(){
int val = 5;

EF4.3.1 on .NET 4 - The mapping of CLR type to EDM type is ambiguous because multiple CLR types match the EDM type
by Chennai in Coding

Update: Subject updated - this is now reproducible on EF 4.3.1 under .NET 4 running with VS2012 installed under Windows 8. Any ideas why this would start happening now?


The subject says it all really. We just upgraded from EF 4.3 code-first to EF 5 running under .NET 4.0. We have a query that looks similar to the following:


ctx.Set<Entities.A>().Select(a =>


Next
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .