public int Delete(string deletelist) { string[] list = deletelist.TrimEnd(',').Split(','); foreach (var item in list) { _repository.Delete(_repository.Get(int.Parse(item))); } return(_repository.Save()); }