public void AddSquads(string organization, IEnumerable <SquadEntity> squads) { var items = SquadModel.Load(organization, squads); foreach (var item in items) { this.Squads.Add(item); } }
public static IEnumerable <SquadModel> Load(string organization, IEnumerable <SquadEntity> entities) { var result = new List <SquadModel>(); foreach (var item in entities) { var model = new SquadModel(); model.Load(organization, item); result.Add(model); } return(result); }