Beispiel #1
0
        public ActionResult Insert(string mainToken, SolarSystemNoteDto dto)
        {
            var main   = _characterService.GetMainCharacterByToken(mainToken);
            var maskId = main.MaskType == MaskType.Alliance && main.Pilot.Corporation.AllianceId != null ? main.Pilot.Corporation.Alliance.MaskId : main.Pilot.Corporation.MaskId;

            var newNote = new SolarSystemNote
            {
                MainCharacterId = main.Id,
                SolarSystemId   = dto.SolarSystemId,
                MaskId          = maskId,
                Content         = dto.Content
            };

            _solarSystemNoteService.Insert(newNote);
            return(Ok());
        }
 public void Update(SolarSystemNote note)
 {
     _context.Update(note);
     _context.SaveChanges();
 }
 public void Insert(SolarSystemNote note)
 {
     _context.SolarSystemNotes.Add(note);
     _context.SaveChanges();
 }