Example #1
0
        public async Task <string> AddNewVisitor([FromQuery] int doc, [FromBody] Visitation visitor)
        {
            var result = await _context.AddNewVisitorAsync(doc, visitor);

            if (result)
            {
                return(JsonConvert.SerializeObject(new { result }, ControllersServices.JsonSettings));
            }
            else
            {
                return(ControllersServices.ErrorMessage("Trouble with adding new Docktor"));
            }
        }