Ejemplo n.º 1
0
        public async Task <CodeProject> AddProject(CodeProject project)
        {
            codeProjectValidation.ValidateAndThrow(project);
            var result = await _client.PostAsync($"api/projects", new StringContent(JsonConvert.SerializeObject(project), Encoding.UTF8, "application/json"));

            result.EnsureSuccessStatusCode();
            var content = await result.Content.ReadAsStringAsync();

            return(JsonConvert.DeserializeObject <CodeProject>(content));
        }
 public async Task <CodeProject> AddProject(CodeProject project)
 {
     return(await Add(project));
 }
 public Task <CodeProject> CreateProject(CodeProject codeProject)
 {
     return(Add(codeProject));
 }