public void DeleteUsaState(UsaState req) { if (req == null) { throw new ArgumentNullException(nameof(req)); } _context.UsaStates.Remove(req); }
public void CreateUsaState(UsaState req) { if (req == null) { throw new ArgumentNullException(nameof(req)); } _context.UsaStates.Add(req); }
public async Task <long> Handle(CreateUsaStateCommand request, CancellationToken cancellationToken) { var entity = new UsaState { Name = request.Name, AbbreviatedName = request.AbbreviatedName }; _context.UsaStates.Add(entity); await _context.SaveChangesAsync(cancellationToken); return(entity.Id); }
public void DeleteUsaState(UsaState req) { throw new System.NotImplementedException(); }
public void UpdateUsaState(UsaState req) { //throw new NotImplementedException(); }