public bool AddBean(BeanVM bean) { int prevCount = GetAllBeans().Count(); var mappedBean = ExtractBeansToModel(new List <BeanVM>() { bean }).SingleOrDefault(); _context.Beans.Add(mappedBean); _context.SaveChanges(); return(GetAllBeans().Count() > prevCount ? true : false); }