public void UpdateRealEstate(RealEstateDTO item)
        {
            RealEstate real = new RealEstate()
            {
                Id               = item.Id,
                RealEstateID     = item.RealEstateID,
                Price            = item.Price,
                Postcode         = item.Postcode,
                Location         = item.Location,
                Bathrooms        = item.Bathrooms,
                Bedrooms         = item.Bedrooms,
                Garden           = item.Garden,
                LivingRooms      = item.LivingRooms,
                Parking          = item.Parking,
                Shower           = item.Shower,
                Tenure           = item.Tenure,
                PropertyStatus   = item.PropertyStatus,
                SSTC             = item.SSTC,
                Area             = item.Area,
                SalesCorner      = item.SalesCorner,
                ImagePath        = item.ImagePath,
                ImageMimeType    = item.ImageMimeType,
                ShortDescription = item.ShortDescription,
                LongDescription  = item.LongDescription
            };

            _testStoreContext.Entry(real).State = EntityState.Modified;
        }
Beispiel #2
0
        public void UpdateDescription(DescriptionDTO item)
        {
            try
            {
                Description description = _testStoreContext.Descriptions.Find(item.Id);
                description.ShortDescription = item.ShortDescription;
                description.LongDescription  = item.LongDescription;

                _testStoreContext.Entry(description).State = EntityState.Modified;
            }
            catch
            {
            }
        }
 public void Update(Company item)
 {
     _testStoreContext.Entry(item).State = EntityState.Modified;
 }