private JobAdFlagList CreateSpecialFlagList(Guid memberId, FlagListType flagListType) { var list = new JobAdFlagList { MemberId = memberId, FlagListType = flagListType }; _jobAdListsCommand.CreateList(list); return(list); }
private JobAdFlagList GetSpecialFlagList(Guid memberId, FlagListType flagListType) { // If it doesn't exist then create it. var lists = _jobAdListsQuery.GetLists <JobAdFlagList>(memberId, (int)flagListType); return(lists.Count == 0 ? CreateSpecialFlagList(memberId, flagListType) : lists[0]); }