Ejemplo n.º 1
0
 public IHttpActionResult GetAllWATGXUsers()
 {
     using (var watxContext = new WATGXEntities())
     {
         var results = watxContext.Staffs.Select(s => new { FullName = s.FirstName + " " + s.LastName, LogonName = s.UserName }).ToList();
         return this.Ok(results);
     }
 }
Ejemplo n.º 2
0
        public IHttpActionResult GetWATGXCurrencies()
        {
            using (var watxContext = new WATGXEntities())
            {
                var results = watxContext.WatgCurrencies.Select(s => new
                {
                    CurrencyShort = s.CurrencyShort,
                    CurrencyLong = s.CurrencyLong + " (" + s.CurrencyShort + ")"
                }).ToList();

                return this.Ok(results);
            }
        }