Пример #1
0
        public async Task <JObject> Family(int id, [FromBody] JArray value)
        {
            dynamic returnObj = new JObject();

            try
            {
                var family = value.ToObject <List <FamilyMemberViewModel> >();
                (bool isSuccess, string message) = await _context.AddUpdateFamilyAsync(id, family);

                returnObj.is_success = isSuccess;
                returnObj.message    = message;
            }
            catch (Exception ex)
            {
                returnObj.is_success = false;
                returnObj.message    = $"Error: {ex.Message}";
            }

            return(returnObj);
        }