예제 #1
0
        internal static IHttpActionResult Insert()
        {
            var userResult = UserImplementaion.GetAll() as OkNegotiatedContentResult <IEnumerable <User> >;
            var userList   = userResult.Content.ToList();

            var products = new List <Receipt>()
            {
                new Receipt()
                {
                    ID = Guid.NewGuid(), Qty = 5, Price = 1000, UserID = userList[0].ID
                },
                new Receipt()
                {
                    ID = Guid.NewGuid(), Qty = 5, Price = 1000, UserID = userList[0].ID
                },
                new Receipt()
                {
                    ID = Guid.NewGuid(), Qty = 5, Price = 1000, UserID = userList[0].ID
                },
            };

            var response = baseController.Insert(products);

            return(response);
        }