Search Results

Search found 8 results on 1 pages for 'sako73'.

Page 1/1 | 1 

  • How to use "SelectMany" with DataServiceQuery<>

    - by sako73
    I have the following DataServiceQuery running agaist an ADO Data Service (with the update installed to make it run like .net 4): DataServiceQuery<Account> q = (_gsc.Users .Where(c => c.UserId == myId) .SelectMany(c => c.ConsumerXref) .Select(x => x.Account) .Where(a => a.AccountName == "My Account" && a.IsActive) .Select(a => a)) as DataServiceQuery<Account>; When I run it, I get an exception: Cannot specify query options (orderby, where, take, skip) on single resource As far as I can tell, I need to use a version of "SelectMany" that includes an additonal lambda expression (http://msdn.microsoft.com/en-us/library/bb549040.aspx), but I am not able to get this to work correctly. Could someone show me how to properly structure the "SelectMany" call? Thank you for any help.

    Read the article

  • "One of the request inputs not valid" error when attempting to update Azure Table Storage

    - by sako73
    I am attempting to update an entry in Azure Table Storage. The function is: public void SaveBug(DaBug bug) { bug.PartitionKey = "bugs"; bug.Timestamp = DateTime.UtcNow; if (bug.RowKey == null || bug.RowKey == string.Empty) { bug.RowKey = Guid.NewGuid().ToString(); _context.AddObject(c_TableName, bug); } else { _context.AttachTo(c_TableName, bug); _context.UpdateObject(bug); } _context.SaveChanges(); } If it is a new entry (the "bug.RowKey == null" path), then it works fine. If it is an update to an existing entity, then the "AttachTo", and the "UpdateObject" calls work, but when it gets to "SaveChanges", it throws the "One of the request inputs not valid" exception. The class that is being stored is: [DataContract] [DataServiceKey("RowKey")] public class DaBug { [DataMember] public bool IsOpen { get; set; } [DataMember] public string Title { get; set; } [DataMember] public string Description { get; set; } [DataMember] public string SubmittedBy { get; set; } [DataMember] public DateTime SubmittedDate { get; set; } [DataMember] public string RowKey { get; set; } public DateTime Timestamp { get; set; } public string PartitionKey { get; set; } } Does anyone know what the problem is? Thanks for any help.

    Read the article

  • How to handle client disconnect with PollingDuplexHttpBinding

    - by sako73
    I am implementing a WCF service, with a Silverlight 3 client, which uses a PollingDuplexHttpBinding for communications. What are the alternatives for handling when a client closes their browser without disconnecting from the server first? I know that it will eventually throw a TimeoutException, which I can catch, but is there a better way of detecting this? Thanks.

    Read the article

  • How to handle both the KeyDown and KeyUp events in a Silverlight 3 TextBox

    - by sako73
    I am attaching handlers to the KeyDown and KeyUp events of a Silverlight 3 TextBox as so: _masterTextBox.KeyDown += (s, args) => { CheckForUserEnteredText(MasterTextBox.Text); args.Handled = false; }; _masterTextBox.KeyUp += (s, args) => { UpdateText(MasterTextBox.Text); }; When I comment out the KeyDown handler, then the KeyUp will trap the event, otherwise, only the KeyDown handler is triggered. Can someone explain why the KeyUp event handler is not firing after the KeyDown handler does? Thanks.

    Read the article

  • How to map a 0..1 to 1 relationship in Entity Framework 3

    - by sako73
    I have two tables, Users, and Address. A the user table has a field that maps to the primary key of the address table. This field can be null. In plain english, Address exist independent of other objects. A user may be associated with one address. In the database, I have this set up as a foreign key relationship. I am attempting to map this relationship in the Entity Framework. I am getting errors on the following code: <Association Name="fk_UserAddress"> <End Role="User" Type="GenesisEntityModel.Store.User" Multiplicity="1"/> <End Role="Address" Type="GenesisEntityModel.Store.Address" Multiplicity="0..1" /> <ReferentialConstraint> <Principal Role="Address"> <PropertyRef Name="addressId"/> </Principal> <Dependent Role="User"> <PropertyRef Name="addressId"/> </Dependent> </ReferentialConstraint> </Association> It is giving a "The Lower Bound of the multiplicity must be 0" error. I would appreciate it if anyone could explain the error, and the best way to solve it. Thanks for any help.

    Read the article

1