public void SaveStars(DateTime dt, int paId, decimal starsValue, string note) { StarsProjectContext starsProjectContext = new StarsProjectContext(); StarsService starsService = new StarsService(starsProjectContext); org.newpointe.Stars.Model.Stars stars = new org.newpointe.Stars.Model.Stars(); PersonAliasService personAliasService = new PersonAliasService(new RockContext()); int campusId = personAliasService.GetByAliasId(paId).Person.GetCampus().Id; stars.PersonAliasId = paId; stars.CampusId = campusId; stars.TransactionDateTime = DateTime.Now; stars.Value = starsValue; stars.Note = note; starsService.Add(stars); starsProjectContext.SaveChanges(); }
/// <summary> /// Initializes a new instance of the <see cref="StarsService"/> class. /// </summary> /// <param name="context">The context.</param> public StarsService(StarsProjectContext context) : base(context) { }