Пример #1
0
 public Available Update(Available available)
 {
     DbEntityEntry entry = context.Entry(available);
     entry.State = EntityState.Modified;
     context.SaveChanges();
     return available;
 }
Пример #2
0
        public void CreateAInvalidAvailablePriceTest()
        {
            Available available = new Available();
            available.Price = 0;

            Validator.Validate(available);
        }
Пример #3
0
        public void CreateAInvalidAvailablePlataformTest()
        {
            Available available = new Available();
            available.Plataform = "Nintendo";

            Validator.Validate(available);
        }
Пример #4
0
        public void CreateAInvalidAvailableGenreTest()
        {
            Available available = new Available();
            available.Genre = "FPS";

            Validator.Validate(available);
        }
Пример #5
0
 public Available Save(Available available)
 {
     var newAvailable = context.Availables.Add(available);
     context.SaveChanges();
     return newAvailable;
 }
Пример #6
0
        public void CreateAInvalidAvailableNameTest()
        {
            Available available = new Available();

            Validator.Validate(available);
        }