示例#1
0
        public void Update(HomeListing changeHome)
        {
            var item = context.homes.Attach(changeHome);

            item.State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            context.SaveChanges();
        }
示例#2
0
 public void Delete(HomeListing homeListing)
 {
     context.homes.Remove(homeListing);
     context.SaveChanges();
 }
示例#3
0
 public void Add(HomeListing homeListing)
 {
     context.homes.Add(homeListing);
     context.SaveChanges();
 }