On Fri, May 24, 2013 at 11:12 AM, Stephen Russell <[email protected]>wrote:

>
> ------------
>
>

I like this type of code for the client:

using (CIMS.SC.ELW.ElogsService.CIMSELServiceContractClient ELServ = new
CIMS.SC.ELW.ElogsService.CIMSELServiceContractClient())
                    {
                        ElogsService.DocGroup[] oDocGroup =
ELServ.getDocGroupList();
<snip>

After I instantiate ELServ I can get everything I have exposed.


In the service itself:

public static List<DocGroup> getDocGroupList()
        {
            using (ELogs2Entities EL = new ELogs2Entities())
            {
                var dGroups = (from dt in EL.DocumentGroups

                               select new DocGroup
                               {
                                   documentGroup = dt.DocumentGroup,
                                   documentGroupNumber =
dt.DocumentGroupNumber
                               }).ToList();
                if (dGroups.Count == 0)
                {
                    DocGroup oDT = new DocGroup();
                    oDT.errorMsg = "No data found";
                    dGroups.Add(oDT);
                }
                return dGroups;
            }

        }


Why screw with Http Get and Http Post?

-- 
Stephen Russell
Sr. Analyst
Ring Container Technology
Oakland TN

901.246-0159 cell


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cajidmyjzn1p-ecmrhg_wsb8odqper9jcxoqget6xnb9dpux...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to