Exemplo n.º 1
0
        public MethodTest()
        {
            DocumentDBRepo <BaseInfo> .Initialize(CollectionBase);

            DocumentDBRepo <Document> .Initialize(CollectionDocument);

            BlobStorage.Initialize();
        }
        public async Task <string> DatabaseTest()
        {
            var doc = await DocumentDBRepo <Item> .CreateItemAsync(new Item
            {
                Id          = Guid.NewGuid().ToString(),
                Name        = "Husk at game i dag!",
                Description = "Vigtigt for dit helbred.",
                Completed   = false
            });

            return("Works!");
        }
        public async Task <IEnumerable <Item> > NewItem([FromBody] Item item)
        {
            var doc = await DocumentDBRepo <Item> .CreateItemAsync(item);

            return(await DocumentDBRepo <Item> .GetItemsAsync());
        }
 public Task <IEnumerable <Item> > GetItems()
 {
     return(DocumentDBRepo <Item> .GetItemsAsync());
 }
Exemplo n.º 5
0
        public async Task <ActionResult> DetailsAsync(string id)
        {
            Employee emp = await DocumentDBRepo <Employee> .GetIEmpAsync(id);

            return(View(emp));
        }
Exemplo n.º 6
0
        public async Task <ActionResult> IndexAsync()
        {
            var employees = await DocumentDBRepo <Employee> .GetItemsAsync(e => e.FirstName != "");

            return(View(employees));
        }