Esempio n. 1
0
        public async Task <IEnumerable <MyItem> > BulkCreate()
        {
            var item1 = await repository.AddOrUpdate(new MyItem
            {
                Description = "Item 1"
            });

            var item2 = await repository.AddOrUpdate(new MyItem
            {
                Description = "Item 2"
            });

            var item3 = await repository.AddOrUpdate(new MyItem
            {
                Description = "Item 3"
            });

            return(await repository.Search("Item "));
        }
Esempio n. 2
0
 public Task <MyItem> Post([FromBody] MyItem item)
 {
     return(repository.AddOrUpdate(item));
 }