public static Criteria CreateCriteria(UserStory userStory, Queue <string> words) { var newCriteria = new Criteria { UserStory = userStory, Header = CreateRecordLine(words, 2, 7), Content = CreateRecordLine(words, 10, 17) }; return(newCriteria); }
public static void CreateDbEntry(UserStory userStory, List <Criteria> criterias = null) { using (var db = new StoryDbContext()) { db.Stories.Add(userStory); if (criterias != null) { db.Criterias.AddRange(criterias); } db.SaveChanges(); } }
public static UserStory CreateUserStory(string uid, Queue <string> words) { var newStory = new UserStory { Id = uid, Actor = CreateRecordLine(words, 1, 5), Goal = CreateRecordLine(words, 8, 13), Value = CreateRecordLine(words, 10, 17) }; return(newStory); }