示例#1
0
 //cc - changed return to int
 //public VehicleDetail EditVehicleDetail(VehicleDetail vehicledetail)
 public int EditVehicleDetail(VehicleDetail vehicledetail)
 {
     db.Entry(vehicledetail).State = EntityState.Modified;
        db.SaveChanges();
        return vehicledetail.Id;
        //return null;
 }
示例#2
0
 public VehicleDetail CreateVehicleDetail(VehicleDetail vehicledetail)
 {
     db.VehicleDetails.Add(vehicledetail);
        db.SaveChanges();
        //return null;
        return vehicledetail;
 }