Пример #1
0
        public async Task <ResponceModel> Get(int id)
        {
            try
            {
                var sector = await sectorService.Get(id);

                return(new ResponceModel(200, "OK", sector, null));
            }
            catch (Exception ex)
            {
                await _logService.Add(new SystemLog()
                {
                    Content = ex.Message, CreateDate = DateTime.Now, UserId = 0, EntityName = sectorService.GetType().Name
                });

                return(new ResponceModel(500, "ERROR", null, new string[] { "Veri getitilirken sorun oluştu." }));
            }
        }