locked
Is it possible to return a boolean value from a Ria Service? RRS feed

  • Question

  • I would like to be able to check to see if an item exists on the server.  

    For example, if a Product already exists in a Product list, I don't want to add it again.  So all I need to do is check to see if the item exists.  I don't need to return the item.

    Is there a way to do this in Ria Services?

    Thanks,

    Greg 

    Saturday, August 7, 2010 4:23 PM

Answers

  •  public bool GetBoolValue()

    {

             return true;

    }

    Ok, that was e z. 

    Saturday, August 7, 2010 4:30 PM

All replies

  •  public bool GetBoolValue()

    {

             return true;

    }

    Ok, that was e z. 

    Saturday, August 7, 2010 4:30 PM
  • This didnt work for me.

    Friday, July 22, 2011 5:53 PM
  • not so fast (notice Invoke).

    [Invoke]
    public bool GetBool() { return true; }

    Friday, July 22, 2011 5:57 PM
  • In VB .Net 2008, Type 'Invoke' is not defined.  What do?

        <RequiresAuthentication(), _
        Invoke()> _
        Public Function SaveMayOrphanData(ByVal ids As Dictionary(Of Decimal, Decimal)) As Boolean
    Friday, July 22, 2011 6:13 PM
  • Apparently you can't pass collections in, passed in two comma seperated strings instead :P 

    Friday, July 22, 2011 7:20 PM
  • poohshoes, what version of RIA Services are you using? That should be possible using the current version (SP1) of WCF RIA Services.

    Sunday, July 24, 2011 11:41 PM