Exemple #1
0
        public async Task <Models.Goal> CreateAsync(Models.Goal goal)
        {
            if (goal == null)
            {
                return(null);
            }

            goal.SetDefaultValues();

            var documentDbProvider = new DocumentDBProvider();

            var response = await documentDbProvider.CreateGoalAsync(goal);

            return(response.StatusCode == HttpStatusCode.Created ? (dynamic)response.Resource : null);
        }