Beispiel #1
0
        public void Test_3_GetAll()
        {
            // Act
            var personResult = PersonImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <Person> >;

            // Assert
            Assert.IsNotNull(personResult);
        }
Beispiel #2
0
        internal static IHttpActionResult Insert()
        {
            var personResult = PersonImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <Person> >;
            var personList   = personResult.Content.ToList();

            var customers = personList.Select(t => new Customer()
            {
                ID = t.ID
            }).ToList();

            var response = baseController.Insert(customers);

            return(response);
        }
Beispiel #3
0
        internal static IHttpActionResult Insert()
        {
            var personResult = PersonImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <Person> >;
            var personList   = personResult.Content.ToList();

            var users = personList.Select(t => new User()
            {
                ID       = Guid.NewGuid(),
                PersonID = t.ID,
                UserName = "******",
                Password = "******",
                Active   = true,
            }).ToList();

            var response = baseController.Insert(users);

            return(response);
        }