public IEnumerable <ItemPramotions> Get() { List <ItemPramotions> ass = new List <ItemPramotions>(); try { var identity = User.Identity as ClaimsIdentity; int compid = 0, userid = 0; foreach (Claim claim in identity.Claims) { if (claim.Type == "compid") { compid = int.Parse(claim.Value); } if (claim.Type == "userid") { userid = int.Parse(claim.Value); } } ass = context.AllItemPramotion().ToList(); return(ass); } catch (Exception ex) { //logger.Error("Error in Item Master " + ex.Message); //logger.Info("End Item Master: "); return(null); } }