public static LittleParentMapModel CreateLittleParentMap(LittleParentMapModel mapModel) { using (var _context = new bbbsDbContext()) { var newMap = _context.Add(new LittleParentMap { LittleId = mapModel.LittleId, ParentId = mapModel.ParentId }); _context.SaveChanges(); mapModel.Id = newMap.Entity.Id; return(mapModel); } }
public LittleParentMapModel CreateLittleParentMap([FromBody] LittleParentMapModel inputModel) { return(UserMappingService.CreateLittleParentMap(inputModel)); }
internal static LittleParentMapModel CreateLittleParentMap(LittleParentMapModel inputModel) { return(UserMappingRepository.CreateLittleParentMap(inputModel)); }