How to get related entities in lightswitch RIA domain service?

I have set up my DomainService and here is the data structure(one CombinedStadium may
have many CombindeEcoStatus)
public class CombinedStadium
[Key]
public int SiteId { get; set; }
[Include]
[Association("Stadium_EcoStatus", "SiteId", "StadiumId")]
public IQueryable<CombindeEcoStatus> EcoStatus { get; set; }
public class CombindeEcoStatus
private CombinedStadium _combinedStadium;
[Key]
public int EcoId { get; set; }
public int Year {get;set;}
public int StadiumId { get; set; }
[Include]
[Association("Stadium_EcoStatus", "StadiumId", "SiteId", IsForeignKey = true)]
public virtual CombinedStadium Stadium
get { return this._combinedStadium; }
set
this._combinedStadium = value;
if (value == null)
this.StadiumId = value.SiteId;
the query is
[Query(IsDefault = true)]
public IQueryable<CombinedStadium> GetAllStadiums()
var stadiumsQuery = from stadium in this.Context.StadiumSet
select new
SiteId = stadium.Id
return stadiumsQuery;
When I consume this RIA service in my lightswitch app as datasource,and the result looks as same as the Original lightswitch Data Source.
Question:When I query the "CombinedStadium" in HTML client. I can't use the "expand" keyword to get the "EcoStatus" Items which belong to the selected
"CombinedStadium" items.the query code is below:
//streetIds, openIds are query parameters
//streetIds is parameter for query the "CombinedStadiumItem" table
//openIds is parameter for query the "CombindeEcoStatusItem" table
myapp.activeDataWorkspace
.WCF_RIA_ServiceData
.CombindedStadiumQuery(streetIds, openIds)
.expand('EcoStatus')
.execute()
.then(function(proItems) {
var test = proItems.results;
addPin2Map(test);
loadStadiumInfoGrid(test);
the browser throw "error 501".
So I query the "CombinedStadiumItem" table alone.the code is below: 
//streetIds, openIds are query parameters
//streetIds is parameter for query the "CombinedStadiumItem" table
//openIds is parameter for query the "CombindeEcoStatusItem" table
myapp.activeDataWorkspace
.WCF_RIA_ServiceData
.CombindedStadiumQuery(streetIds,openIds)
.execute()
.then(function(proItems) {
var test = proItems.results;
addPin2Map(test);
loadStadiumInfoGrid(test);
myapp.activeDataWorkspace
.WCF_RIA_ServiceData
.RiaEcostatusQuery(streetIds,openIds)
.execute()
.then(function(proItems) {
var test = proItems;
and the query code in server :
partial void CombindedStadiumQuery_PreprocessQuery(string streetPara, string openPara, ref IQueryable < CombinedStadiumItem > query) {
var street = ParseParaStr(streetPara);
if (street != null) {
query = query.Where(e => street.Contains(e.Street));
var open = ParseParaStr(openPara);
if (open != null) {
//when I try to access "EcoStatus" property in "CombindedStadiumItem" table,it throws error
query = query.Where(e => e.EcoStatus.Any(eco => open.Contains(eco.OpenStatus)));
//when I try to access "Stadium" property in "CombindedEcoStatusItem" table,it throws error
partial void RiaEcostatusQuery_PreprocessQuery(string streetPara, string openPara, ref IQueryable < CombindeEcoStatusItem > query) {
var street = ParseParaStr(streetPara);
if (street != null) {
//when I try to access "Stadium" property in "CombindedEcoStatusItem" table,it throws error
query = query.Where(e => street.Contains(e.Stadium.Street));
var open = ParseParaStr(openPara);
if (open != null) {
query = query.Where(e => e.EcoStatus.Any(eco => open.Contains(eco.OpenStatus)));
Now, I can not get "CombindedEcoStatusItem" that related selected "CombindedStadiumItem" respectively.
How can I  get related entities when I use lightswitch RIA service in  HTML Client query?
Thanks!!!

How to write to the event log is not a WPF topic. Please ask C# questions in the C# forum:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral
There is an example of how to the event log using C# code available here:
https://support.microsoft.com/en-us/kb/307024?wa=wsignin1.0
This sample code should work:
string sSource;
string sLog;
string sEvent;
sSource = "My application name";
sLog = "Application";
sEvent = "Log initialization";
if (!System.Diagnostics.EventLog.SourceExists(sSource))
System.Diagnostics.EventLog.CreateEventSource(sSource, sLog);
System.Diagnostics.EventLog.WriteEntry(sSource, sEvent);
System.Diagnostics.EventLog.WriteEntry(sSource, sEvent,
System.Diagnostics.EventLogEntryType.Warning, 234);
The event will get added to Event Viewer->Windows Logs->Application.
Please remember to close your threads by marking helpful posts as answer and then start a new thread in the appropriate forum if you have a new question. And please don't ask several questions in the same thread.

Similar Messages

  • How to get informed by email about changes on service messages of the servi

    How to get informed by email about changes on service messages of the service desk.
    I need a kind of overview
    functional details
    and a very good guideline to do the implementation
    Does anyone know how to do it?

    Hi,
    Go throw this
    Note  691303, Note 1041455
    you will find each and every thing abt  implementation .
    Send mail to Message Processor in Service Desk
    Points if helpfull
    Regards,
    Neni

  • Can anyone tell me how i get to speak to someone in customer service? they are retiring Forms Cental and i really need to speak to someone about the renewl of my subscription. THe live chat has been unavailable for two weeks and there is no other option t

    Can anyone tell me how i get to speak to someone in customer service? they are retiring Forms Cental and i really need to speak to someone about the renewl of my subscription. THe live chat has been unavailable for two weeks and there is no other option to get in touch with these people. Any ideas anyone?

    Hi SwarovskiUK,
    I'm sorry to hear that you've been having trouble contacting Customer Care. Live Chat is certainly available--are you not seeing the chat option on the Contact Customer Care page? Or are just not able to get through?
    In any case, I should be able to help you myself. What can I do for you?
    Best,
    Sara

  • How to get system status and user status of service order

    Hi,
    I want to show user status and system status for service order in my report and i am using CRM_ORDER_READ function module to read the status, but it is returning lot of status records, could anyone please suggest how to get the system status and user status for service order.
    I did not find any clue for how to get user status, i can see the user status when i open the transaction using CRMD_ORDER.
    Regards,
    Kamesh Bathla

    Hi,
      Go to CRM_JEST table give your service order guid and get the status, pass this status into TJ02. You will get the status of your order.
    Regards
    Srinu

  • How to get the UDDI Key to publish a service provider system in SR?

    Hi,
    I am following instruction in appendix 1 & 2 of the white paper at https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1079b1af-dcb7-2b10-9ebb-eafcaa3cbbea?overridelayout=true
    trying to publish a service provider system into the service registry. One thing not clear to me is how to get the uddikey as needed in step 6 in appendix 1.
    My service registry is in a PI 7.1 SP4 system. I followed the instruction in appendix 2 but there is no uddi key displayed in the General tab. Please help.
    Regards,
    Jiannan
    Paragraph extracted from the whitepaper:
    There may be cases in which the NWA logical settings do not match the Services Repository
    settings when Visual Composer is trying to locate the enterprise services. Such cases can occur
    when there is no SLD ID definition of the physical system in the Services Repository.
    Currently, Visual Composer cannot search for services on a physical system with an empty SLD ID
    (which is not a valid one).
    To obtain this capability, the following steps should be performed to generate the necessary data
    for each system with a non-valid SLD ID, so that Visual Composer can search for services over it.
    1.Log on to http://<serverName>:<serverPort>/WSNavigator.
    2.Select the Services Registry radio button.
    3.In the Find field, enter sr and choose Go.
    4.Select the ServicesRegistrySi line and choose Next.
    5.Under the Operation Name, search for the publishPhysicalSystems operation, select it and choose Next.
    6.Fill the service information parameters with the following (see Appendix 2 for details on how to get this information) :
      6.1.Click the + icon in the physical system[].
      6.2.Deselect the Classifications checkbox.
      6.3.Click the + icon in the classificationReferenceGroups[].
      6.4.Click the + icon in the classificationReferences[].
      6.5.Deselect the classificationSystemKey checkbox.
      6.6.Deselect the uddiKey checkbox and enter the value <localUddiKey>.
      6.7.Deselect the value checkbox and enter the value <localSystemHostName>.
      6.8.Deselect the host checkbox and enter the value <localHostName>.
      6.9.Deselect the physicalSystemKey checkbox.
      6.10.Deselect the logical key checkbox and enter the value <System name>.<SystemHome>.<host name>.
      6.11.Deselect the systemName checkbox and enter the value <system name>.
      6.12.Deselect the type checkbox and enter the value 2.

    Hi Jiannan,
    No worries, you can go to UDDI client from the main page of PI  i.e. http://<serverName>:<serverPort>/
    And you use the search function for  the TModel for your Physical System. Search parameters can use the % wildcard.
    Hit the search and you find the UDDI Key for the Physical System.
    Cheers.
    Hemant Chahal

  • How to get contents of Soap Over JMS web service's wsdl file

    Hi,
    Is there a way to get the soap over jms webservice's wsdl file in browser? if yes please provide me the details how to get it.
    OR how can i get the contensts of WSDL file for soap over jms wsdl file.
    thanks in advance.

    I have the same question ("Assuming I can generate a wsdl file, can I recreate the SOAP request message from the WSDL file automatically (that matches the original request, which is hand build by me?)")
    Have you already found an answer to this?

  • How to get the Memory Utilization Data for Cloud Service

    Hi,
    We are planning to monitor the Performance of Cloud Services hosted onto Azure through VisualStudioOnline [TFS]. However, I couldn't find any performance metric for Memory utilization on individual Cloud Service.
    So please help how can we monitor Memory utilization on individual Cloud Service hosted through VSO.
    Thanks.
    Regards,
    Subhash Konduru
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    If you are using the VSO then you can take a look at azure application insights which is a service hosted on azure which will help you to detect issues, solve problems and continuously improve your web applications.
    Read more about Application insights here - 
    http://azure.microsoft.com/en-us/documentation/articles/app-insights-get-started/
    https://msdn.microsoft.com/en-us/library/dn793604.aspx
    Bhushan | Blog |
    LinkedIn | Twitter

  • How to get related table on Account Inquiry Drilldown

    Hi,
    I want to create customize table for trial balance report. So, I need drilldown detail query or related table to create these report. Please, explain how to relate table to display data on Drilldown account inquiry? I'm very happy if you can show me query script.
    Regards,
    Adhit

    Hi Octavio,
    Thx for your answer. I think that's not full related table. I want to view drilldown detail not only account trial balances.
    How about this table below :
    gl.gl_code_combinations gl,
    gl.gl_import_references gir,
    gl.gl_je_batches gjb,
    gl.gl_je_headers gjh,
    gl.gl_je_lines gjl,
    gl.gl_je_sources_tl gjs,
    xla.xla_ae_headers xah,
    xla.xla_ae_lines xal,
    xla.xla_distribution_links xdl,
    inv.mtl_transaction_accounts mta,
    inv.mtl_material_transactions mtt,
    po.po_headers_all pha,
    po.po_distributions_all phd,
    PO.RCV_TRANSACTIONS prt,
    PO.RCV_RECEIVING_SUB_LEDGER rrsl
    how to join all above tables rightly? Because it comes to complex problems.
    Edited by: adhit_976743 on Dec 13, 2012 6:21 PM

  • How to get relative position of layer in larger precomp.

    The Setup:
    Comp 1 is 2000x3000 pixels. Comp 1 contains Layer X that is positioned at 1750,1250. (or whatever)
    I pull Comp 1 into Comp 2 which is 800x600. I scale and move Comp 1 inside Comp 2 by an arbitrary amount.
    How can I determine Layer X's position using Comp 2's coordinate space?

    Hmmmm... That's not working either.
    Inserting this expression into an Effect's point control doesn't put it in the right position.  I tried inserting this expression into another (2D) null's position, but it's in the same incorrect place.
    Original Null A Position (from C4D project import).  This comp is put into Comp ZZ.
    Applying that Expression to Null's position in Comp ZZ puts the new Null B way off in the corner.

  • How to get the request xml string in Business service.

    Hi
    I have following requirement
    1) XAI inbound service will get a input xml request feed and call the Business Service.
    2) Business service will do some validation and do the insert in the database.
    My BS schema is as below
    <schema pageAction="change">
    <personId mapField="PER_ID"/>
    <personOrBusiness mapField="PER_OR_BUS_FLG"/>
    <name mapField="ENTITY_NAME" mdField="C1_ENTITY_NAME"/>
    <emailAddress mapField="EMAILID"/>
    <city mapField="CITY"/>
    <county mapField="COUNTY"/>
    <postal mapField="POSTAL"/>
    <houseType mapField="HOUSE_TYPE"/>
    <taxVendorGeographicalCode mapField="GEO_CODE"/>
    <isInCityLimit mapField="IN_CITY_LIMIT"/>
    <state mapField="STATE"/>
    <version mapField="VERSION"/>
    <division mapField="CIS_DIVISION"/>
    <accessGroup mapField="ACCESS_GRP_CD"/>
    <address1 mapField="ADDRESS1"/>
    <personCharacteristic type="list" mapList="CI_PER_CHAR">
    <personId mapField="PER_ID"/>
    <characteristicType mapField="CHAR_TYPE_CD"/>
    <characteristicValue mapField="CHAR_VAL"/>
    <effectiveDate mapField="EFFDT"/>
    <adhocCharacteristicValue mapField="ADHOC_CHAR_VAL"/>
    <characteristicValueForeignKey1 mapField="CHAR_VAL_FK1"/>
    <characteristicValueFK2 mapField="CHAR_VAL_FK2"/>
    <characteristicValueFK3 mapField="CHAR_VAL_FK3"/>
    <characteristicValueFk4 mapField="CHAR_VAL_FK4"/>
    <characteristicValueFK5 mapField="CHAR_VAL_FK5"/>
    </personCharacteristic>
    </schema>
    The request XML to BS is as below_
    (support.schema.AbstractSchemaBasedDispatcher) Performing page:change of BusinessService CM_SPRDSHT_BS' (service='CMSPRDHSHTUPLD'), with input request
    <?xml version="1.0" encoding="UTF-8"?>
    <CM_Person>
    <personOrBusiness>P</personOrBusiness>
    <name>Marsh,Corporate</name>
    <emailAddress>[email protected]</emailAddress>
    <city>Tampa</city>
    <country>USA</country>
    <postal>2131</postal>
    <houseType/>
    <taxVendorGeographicalCode/>
    <isInCityLimit/>
    <state>CA</state>
    <version>1</version>
    <division>930</division>
    <accessGroup>***</accessGroup>
    <address1>Address of Khan</address1>
    </CM_Person>
    I can access the values of each xml node in BS with the help of data item.
    I wanted to know how can I get the above request xml string in my Business Service in Java.

    {color:#0000ff}http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
    http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#valueOf(java.lang.String){color}

  • How to get a collection of beans using web services

    Hi,
    I'm new to SOAP and Web Services I'd like to know whether the following is possible
    or not.
    I've created an EJB with this business interface:
    public interface Users implements EJBObject {
    public User[] getUsers( ) ...
    Where the User object is a bean with some properties:
    public User implements Serializable {
    public void setName( ... ) ...
    public String getName( ) ...
    public void setAddress( ... ) ...
    public String getAdress( ) ...
    I've create the ejb-jar.xml and weblogic-ejb-jar.xml that contain the definition
    of my EJB and then I try to deploy the web services using the ant task 'wsgen'.
    I get the following exception:
    org.xml.sax.SAXException: Could not find a codec that understood how to convert
    class [LUser; using http://schemas.xmlsoap.org/soap/encoding/
    : [ CodecFactory: http://xml.apache.org/xml-soap/literalxml=null, http://schemas.xmlsoap.org/soap/encoding/=null,
    =null]
    Can someone help to resolve this ? Also, I'd like to know if it's possible that
    a web service return a collection of beans as shown above ?
    Thanks for your help.
    Ludovic.

    Java beans are serialized/deserialized by the soap encoding codec
    itself. you dont have to write custom encoders. I think the error
    is because you dont have the java bean class on the server side.
    Java bean class file should be in the classpath or it should be
    added to the ejb jar file.
    thanks,
    -manoj
    Ludovic Deravet wrote:
    Thanks for your help. Indeed, that was my problem.
    But now I'm facing this one:
    [SOAPException: faultCode=SOAP-ENV:Client; msg=No Deserializer found to
    deserialize a 'urn:local:ns0:return' using encoding style 'http://sch
    emas.xmlsoap.org/soap/encoding/'.;
    targetException=java.lang.IllegalArgumentException: No Deserializer found to
    deserialize a 'urn:local:ns0:
    return' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.]
    at org.apache.soap.rpc.Call.invoke(Call.java:246)
    at com.webservices.WSClient.main(WSClient.java:38)
    Did you implement your own deserializer to read your array of beans (called
    Data) ? Or do I need to do something else ?
    Thanks.
    Ludovic.
    "manoj cheenath" <[email protected]> wrote in message
    news:[email protected]...
    You can do this. I guess, the problem is because you have
    not defined a package for the bean.
    Try something like:
    package foo.bar;
    class User{
    I am attaching an example.
    -manoj
    Ludovic Deravet wrote:
    Hi,
    I'm new to SOAP and Web Services I'd like to know whether the following
    is possible
    or not.
    I've created an EJB with this business interface:
    public interface Users implements EJBObject {
    public User[] getUsers( ) ...
    Where the User object is a bean with some properties:
    public User implements Serializable {
    public void setName( ... ) ...
    public String getName( ) ...
    public void setAddress( ... ) ...
    public String getAdress( ) ...
    I've create the ejb-jar.xml and weblogic-ejb-jar.xml that contain thedefinition
    of my EJB and then I try to deploy the web services using the ant task'wsgen'.
    I get the following exception:
    org.xml.sax.SAXException: Could not find a codec that understood how toconvert
    class [LUser; using http://schemas.xmlsoap.org/soap/encoding/
    : [ CodecFactory: http://xml.apache.org/xml-soap/literalxml=null,
    http://schemas.xmlsoap.org/soap/encoding/=null,> > > =null
    Can someone help to resolve this ? Also, I'd like to know if it's
    possible that
    a web service return a collection of beans as shown above ?
    Thanks for your help.
    Ludovic.

  • How to get Values maintained for a Given Domain

    Hi,
    I have a requirement to display in a report the values maintained for a domain.
    For Eg :
      In table (J_1IEXCDTL) for a field(CAPIND) at the domain level they maintained
                Fix Value     Short Desc
         C     Consumables
         A     Assets
         T     Tools
         N     Noncenvatable
                =            Raw materials
         F     RG1
      Now i am unable to get the value range data to an internal table in my report.
      How can  i get the value range data in to an internal table.
    Regards,
    Chinna.

    Hello Chinna
    You can use fm DDIF_DOMA_GET.
    Alternatives are:
    fm DDUT_DOMVALUES_GET
    fm DD_DOMVALUES_GET (DD: official external interfaces)
    Regards
      Uwe

  • How to get all users in a given domain ?

    Hi,
    I need to get all user names in a machine given the domain name.
    Is it possible ?
    kaushalya

    kaushalya.cse wrote:
    I'm having a application where it asks for user name with domain.
    After given that i need to check whether given user name is a existing one in that domain before proceeding.What do you mean with "existing". Do you want to know if <username>@<domain> is a valid email adress? If such a user exists within the Windows Domain? Or something else?
    Generally: no, there's no way to verify those things.
    If your goal is to verify the email address then the common solution is to send a mail to that address that contains a code that needs to be entered to proceed. This way the user can only proceed if he can indeed receive mail at that address.

  • How to get logged in user name from windows service c#

    i use the below code to get logged in user name.
    private string GetLoggedInUser()
    string userName = "";
    if (System.Security.Principal.WindowsIdentity.GetCurrent() != null)
    userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
    return userName;
    just do not understand why it is not giving a logged in user name rather it is return data in this format
    NT AUTHORITY\SYSTEM but i want to get user name.
    i try to run my service as Local Service and local system account but in every case i am getting this string
    NT AUTHORITY\SYSTEM instead of logged in user name.
    so please guide me what to change in code. thanks

    System is the account the service is running under.
    There can be none or many interactive users be logged in. What if none or multiple are logged in? Which one are you referring to then?
    Armin

  • How to get the root directory of a domain?

    I have a domain setup at
    C:\bea\user_projects\domains\myDomain
    I have tried the following;
    Getting the domain object : get attr DomainConfiguration from DomainRuntimeServiceMBean
    Get root dir : get attr RootDirectory from domain object
    It returns ".", but I need the full path.
    Is there an issue with the RootDirectory from domain object or in my approach?

    John,
    OK. If you want to go the JMX route, have a look at the CurrentDirectory attribute of the ServerRuntime mbean. It would report your directory as this:
    C:\bea\user_projects\domains\myDomain\.
    Mike
    Weblogic/J2EE Security Blog: http://monduke.com

Maybe you are looking for

  • I can't install itunes

    keep getting the following error code....what can i do or what am i not doing? ERROR_INSTALL_PACKAGE_ OPEN_FAILED             1619   This installation package could not be                                 opened. Verify that the package exists and    

  • QuickTime Pro 7 vs QuickTime X

    I downloaded QuickTime Pro 7, only to find that I have QuickTime 10 on my computer.  I can't use it to register QuickTime 7 Pro, and it won't let me uninstall QuickTime 10 so I can install QuickTime 7.  I just wasted $30.  Is there anything I can do?

  • Filter/Search/Smart *: EXCLUDE keywords

    I would like to create a filter, a search, or a smart album/webpage, where I can search for images that do NOT have a certain keyword. Is there a way to do that? Even better if I could combine it: search for images that HAVE a certain keywords, but d

  • I downloaded photoshop, but it wont open when i click it

    I downloaded photoshop, but it wont open when i click it

  • Printing error message and failure to print from PhotoSmart

    I can do all of the various photo functions in photosmart, but when I click on Print, I consistently get the "Printing Error:The slected paper size is too small for the current print size."  At no point am I directed to select the paper size.  I know