Пример #1
0
 public void AddTags(Tags tags)
 {
     //if (bdb.Tags.Any(e => e.TagId == tags.TagId))// || tags.TagId == null)
     //{
     //    Console.WriteLine($"This tag {tags.TagId} is already in use");
     //    return;
     //}
     //else
     bdb.Tags.Add(tags);
     bdb.SaveChanges();
 }
Пример #2
0
 public void AddBookings(Bookings bookings)
 {
     if (bdb.Bookings.Any(e => e.BookingId == bookings.BookingId) || bookings.BookingId == null)
     {
         Console.WriteLine($"This booking {bookings.BookingId} has already been made");
         return;
     }
     else
     {
         bdb.Bookings.Add(bookings);
     }
     bdb.SaveChanges();
 }
Пример #3
0
 public void AddClients(Clients clients)
 {
     if (bdb.Clients.Any(e => e.ClientName == clients.ClientName) || clients.ClientName == null)
     {
         Console.WriteLine($"This location name {clients.ClientName} is already in use");
         return;
     }
     else
     {
         bdb.Clients.Add(clients);
     }
     bdb.SaveChanges();
 }