Exemple #1
0
        public void Initialize()
        {
            ContactBL controller = new ContactBL();

            if (controller.Read().Count < 15)
            {
                for (int i = 0; i < 15; i++)
                {
                    var contact = new Contact()
                    {
                        FirstName   = Random.GetString,
                        LastName    = Random.GetString,
                        Address     = Random.GetAddress,
                        PhoneNumber = Random.GetPhoneNumber,
                        Birthday    = Random.GetDateOfBirth
                    };

                    controller.Create(contact);
                }
            }
        }
 // POST api/values
 public void Post([FromBody] Contact value)
 {
     op.Create(value);
 }