public int AddLot(Lot NewData, List <Tag> Tags) { if (NewData.Product.Company.Length < 2) { throw new ArgumentException("too short company name"); } if (NewData.Product.Title.Length < 3) { throw new ArgumentException("too short title"); } if (NewData.Price < 0) { throw new ArgumentException("price must be above 0"); } if (NewData.DateStart > NewData.DateEnd) { throw new ArgumentException("Start date must be before end date"); } if (NewData.DateStart > DateTime.Now) { throw new ArgumentException("auction can't be started before create"); } return(Dal.AddLot(NewData, Tags)); }