wcf-data-services

Dynamic query data from WCF Data Service to Silverlight Application?

霸气de小男生 提交于 2020-01-06 08:41:36
问题 I have a Silverlight application that contains a window that lists several values in multiple columns. The first column contains fields to be retrieved from a database, the second column contains table names. Multiple fields can be selected from the first column and only one field can be selected from the second column. So, the idea is to build a query that can select multiple columns from one of several tables (assume the column names are the same for each table). My question is how do I

Securing an ADO.net WCF data service with ASP.NET Membership

佐手、 提交于 2020-01-06 05:06:28
问题 HI, I am using WCF DataServices, i am trying to securing it using asp.net membership here is my code, <system.serviceModel> <bindings> <wsHttpBinding> <binding name="SecureWSBindingWithMembershipConfig" > <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None" /> <message clientCredentialType="UserName"/> </security> </binding> </wsHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="SecureServiceWithMembershipBehavior"> <serviceMetadata

Entity Framework POCO to ViewModel in MVC 3

自作多情 提交于 2020-01-05 16:38:07
问题 I have an example project, a dynamic questionnaire system where any administrator can create a questionnaire, then add groups of questions to it and in-turn add questions to each question group. Take the following group of POCOs that make up the entities for my EF data context: public class Questionnaire { public virtual int Id { get; set; } public virtual string QuestionnaireName { get; set; } public virtual IList<QuestionGroup> QuestionGroups { get; set; } } public class QuestionGroup {

Entity Framework POCO to ViewModel in MVC 3

限于喜欢 提交于 2020-01-05 16:37:43
问题 I have an example project, a dynamic questionnaire system where any administrator can create a questionnaire, then add groups of questions to it and in-turn add questions to each question group. Take the following group of POCOs that make up the entities for my EF data context: public class Questionnaire { public virtual int Id { get; set; } public virtual string QuestionnaireName { get; set; } public virtual IList<QuestionGroup> QuestionGroups { get; set; } } public class QuestionGroup {

The method Distinct is not supported

眉间皱痕 提交于 2020-01-04 12:57:12
问题 I am using Linq to Entities and am getting this error The method Distinct is not supported On this line of code var typeIds = _context.AttributeValues.Select(av => av.AttributeTypeId).Distinct(); Why is this? 回答1: A solution is to define a WCF Data Service using (server-side) the QueryByCube method provided by my product AdaptiveLINQ (www.adaptivelinq.com). This method transforms a projection (expressed by the select operator) in an aggregation . You have just to define a cube with one

WCF Data Services Type Could Not Be Found

瘦欲@ 提交于 2020-01-03 16:14:27
问题 I'm trying to move a WCF Data Service from hosted within VS2010 to a development web server. When I move the code to an IIS7 application, I get this error: The type 'Aaa.Bbb.Services.ZzzEntities', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found. ZzzEntities.svc <%@ ServiceHost Language = "C#" Factory = "System.Data.Services.DataServiceHostFactory,

JMeter test plan with different parameter for each thread

我只是一个虾纸丫 提交于 2020-01-03 13:09:09
问题 I need to test web-srvice with JMeter. I've created test plan with Thread-group 500. I need to pass for each thread new value of parameter. I've heard about "CSV Data Set Config", but it doesn't allow what I want, because if I set "Sharing mode" = "All threads" then each thread will try to read from file each row - I want pass first value in file for first thread, second value for second thread and so on. Of course I can create 500 files with one line but this approach is stupid and slow. How

Exposing a .NET class library (which primarily defines CRUD operations) as a service

僤鯓⒐⒋嵵緔 提交于 2020-01-03 10:22:30
问题 What is the best, efficient and fastest way to expose an existing (class) library (which primarily defines CRUD operations ) as a service ( WCF Service or WCF Data Service ), so that it can be used with Silverlight or Ajax . Are there tools (code generators, RAD tools), which can support this ? Thanks in advance for your help and hints. 回答1: The best approach is to use WCF to create a wrapper yourself. You should do this, rather than using some automation to just expose the library directly

Uploading and downloading files using wcf data services?

流过昼夜 提交于 2020-01-03 05:59:10
问题 I have been trying to find information regarding if it is possible to upload and download files using WCF Data Services (formerly ADO.NET Data Services), but haven't been able to make any leads due to perhaps less help content available on wcf data services on the web as of now. Is it possible for us to write a wcf data service so that client can post to the following URI to upload a file - http://some-restfulwebservice/Files/upload and this url to download the fie - http://some

OData:Wildcard (startswith) filtering for number (ID) fields in the url request

回眸只為那壹抹淺笑 提交于 2020-01-02 22:32:21
问题 I've been researching a way to perform fuzzy searches for my numerical ID fields of my entity via OData and JavaScript. So far, I have not found the answer I am looking for. I can filter other edm.string columns perfectly using the "Startswith" filter option, however when i attempt to pass in any other non-string type, I get a type error response from the server back. In applications that I control the database, I was successfully able to get around this, by creating views I need and