abhishek bisht

abhishek bisht

  • NA
  • 19
  • 1.2k

I want to create dictionary for one to many relation ship

Jul 7 2016 5:35 AM
hi,
 
i want to create a method using dictionary .so that i can map one id with other id in same table and it should be one to many relationship . so that on click i can update all level id in one shot .
 
public bool UpdateVisioData(VisioShapeDataDALDTO visioObjToUpdate)
{
bool isUpdate = false;
if (visioObjToUpdate.ModifiedDate == DateTime.MinValue)
visioObjToUpdate.ModifiedDate = DateTime.Now;
VisioShapeData entity = DBContext.VisioShapeDatas.Where(a => a.ID == visioObjToUpdate.ID).FirstOrDefault();
entity.Level4Id = visioObjToUpdate.Level4Id;
if (DBContext.SaveChanges() > 0)
{
isUpdate = true;
}
return isUpdate;
}
 
 how i will implement dictionary in this method plz let me know asap.. 

Answers (1)