public async Task <ActionResult <ownership_type> > Postownership_type(ownership_type ownership_type)
        {
            _context.ownership_types.Add(ownership_type);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("Getownership_type", new { id = ownership_type.id }, ownership_type));
        }
        public async Task <IActionResult> Putownership_type(int id, ownership_type ownership_type)
        {
            if (id != ownership_type.id)
            {
                return(BadRequest());
            }

            _context.Entry(ownership_type).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ownership_typeExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }