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(); }
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)); } }