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(); }
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(); }
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(); }