public int Add(Goods a) { YogaEntities ey = new YogaEntities(); ey.AddToGoods(a); return ey.SaveChanges() == 1 ? a.Id:-1; }