Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            TrackerService trackerLogic = new TrackerService();
            Stopwatch      clock        = new Stopwatch();

            clock.Start();
            projectService.CreateProject("Poneslas");
            trackerService.ReadTracker();
            trackerService.UpdateTracker(2, "Process", "Rabota", 2);
            trackerService.DeleteTracker(2, "Process", "Rabota", 2);
            developerService.ZaprosProjectTracker();
            customerService.ZaprosCustomerProject();
            clock.Stop();
            Console.WriteLine(clock.ElapsedMilliseconds);
            Insert();
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <Tracker?> > UpdateTracker(UpdateTrackerRequest request, long id)
        {
            try
            {
                Tracker tracker = await TrackerService
                                  .UpdateTracker(id, request.GameId, request.ChannelId)
                                  .ConfigureAwait(false);

                return(Ok(tracker));
            }
            catch (InvalidOperationException ex)
            {
                return(Problem(ex.Message, statusCode: (int)HttpStatusCode.Conflict));
            }
            catch (ArgumentException ex)
            {
                return(Problem(ex.Message, statusCode: (int)HttpStatusCode.BadRequest));
            }
        }