public Type ToType(ViewType typeV) { return new Type() { Id = typeV.IdV, Name = typeV.NameV }; }
public bool ValType(ViewType typeV) { bool exist = false; foreach(var item in db.Types) { if (typeV.NameV.ToLower() == item.Name.ToLower()) { exist = true; } } return exist; }