public VotersPartyModel AddVote(VotersPartyModel votersPartyModel)
        {
            VotersParty addedVotersParty = votersPartyModel.ConvertToVotersParty();

            DB.VotersParties.Add(addedVotersParty);
            DB.SaveChanges();
            votersPartyModel.VotersPartyId = addedVotersParty.VotersPartyId;
            return(votersPartyModel);
        }
Beispiel #2
0
 public VotersPartyModel(VotersParty votersParty)
 {
     VotersPartyId = votersParty.VotersPartyId;
     PartyId       = votersParty.PartyId;
     VoterId       = votersParty.VoterId;
 }