public async Task OnPostSavePicture() { if (Upload != null) { List <Links> linksSperated = new List <Links>(); if (Name != null) { if (links == "") { string[] SplitLinks = links.Split(','); foreach (string element in SplitLinks) { string[] temp = element.Split(' '); linksSperated.Add(new Links { link = temp[1], name = temp[0] }); } } try { await SingleTon.GetSQLConnector().AddNewItemToContainerAsync(new Entities.Project() { Name = this.Name, SmallDescriptiom = this.smallDescription, Description = this.Description, ImagePath = await BlobAccess.UploadImage(Upload.OpenReadStream(), Upload.FileName), TrelloLink = this.TrelloLink, GithubLink = this.Github, OtherLinks = linksSperated.ToArray(), Id = Name + Guid.NewGuid().ToString() }); } catch (Exception ex) { Console.WriteLine(ex.Message); } } //testTextURI = await BlobAccess.UploadImage(Upload.OpenReadStream(), Upload.FileName); } }
public void OnGet() { Projects = SingleTon.GetSQLConnector().GetProjects().Result; }
public void OnGet(int id) { project = SingleTon.GetSQLConnector().GetProjects().Result[id]; }