public async Task <ActionResult <propertyclass> > PostPropertyClass(propertyclass propertyclass)
        {
            _context.propertyclass.Add(propertyclass);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("Getpropertyclass", new { id = propertyclass.propertyClassId }, propertyclass));
        }
        public async Task <IActionResult> PutPropertyClass(int id, propertyclass propertyclass)
        {
            if (id != propertyclass.propertyClassId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }