private int getMaxId()
        {
            IEnumerable <Buyer> all = buyerRepository.FindAll();

            foreach (Buyer a in all)
            {
                if (a.Id > maxId)
                {
                    maxId = a.Id;
                }
            }
            return(maxId + 1);
        }