public JsonResult Get() { UserInfo user = _jwtFactory.DecodedRequestAuth(Request); var data = _context.OrderHdrs .Where(x => x.CustomerCode == user.companyCode) .Select(x => new SalesOrder { id = x.ID, AccountStatus = x.AccountStatus, CustomerCode = x.CustomerCode, CustomerName = x.CustomerName, OrderDate = x.OrderDate, OrderNo = x.OrderNo, OrderStatus = x.OrderStatus, OrderType = x.OrderType, Remark = x.Remark, ResellerCode = x.ResellerCode, updateDate = x.UpdateDate, createDate = x.CreateDate } ).ToList(); JsonResult dataJson = new JsonResult(data); return(dataJson); }