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