public ActionResult Add() { var leadType = new LeadType(); return View(new LeadTypeModel { Id = leadType.Id, }); }
public void Add(LeadTypeModel model) { var leadType = new LeadType(); leadType.Name = model.Name; leadType.IsDeleted = false; foreach (var tag in model.TagsId) { leadType.LeadTags.Add(_tagBusinessLogic.GetById(tag)); } //leadType.LeadTags.AddRange(model.Tags); _leadTypeBusinessLogic.Add(leadType); }